Results for “indexed access”
Small, practical examples. Search by task or narrow things down below.
Read a property with keyof
Keep the key and returned value tied to an object type.
keyof✓ Tested
Allow embedded scripts without granting same-origin access
HTML: Grant only allow-scripts so the sandboxed document retains an opaque origin.
HTML✓ Tested
Bind an accessibility attribute
Bind an accessibility attribute with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Exclude a purely decorative image from accessible content
HTML: An empty alt indicates that this image adds no information beyond nearby content.
HTML✓ Tested
Give a section an accessible region name
HTML: A section becomes a named landmark when its heading is referenced with aria-labelledby.
HTML✓ Tested
Give an inline SVG an accessible name
HTML: Use a title referenced by aria-labelledby for a meaningful inline vector image.
HTML✓ Tested
Limit concurrent access with SemaphoreSlim
C#: Release the semaphore in finally so exceptions cannot leave it permanently acquired.
C#✓ Tested
Remove an indexed element and compact the array
Bash Scripts: Unsetting an element leaves a gap; reassigning the values creates consecutive indices.
Bash Scripts✓ Tested
Render a table with accessible headers
Render a table with accessible headers with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Validate access through a custom context hook
Validate access through a custom context hook with a small React component and explicit browser behavior.
React✓ Tested
Add depth with a box shadow
CSS: Box shadows are painted outside the box without reserving additional layout space.
CSS✓ Tested
Align an image within its content box
CSS: Object-position places the rendered object when fitting leaves spare space or crops an edge.
CSS✓ Tested