Results for “aria”
Small, practical examples. Search by task or narrow things down below.
Expose a disclosure button’s expanded state
HTML: Keep aria-expanded synchronized with the controlled panel’s hidden state.
HTML✓ Tested
Format a decimal amount
Use invariant culture to print a C# decimal with two places.
C#✓ Tested
Format a zero-padded numeric label
Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.
Linux Commands✓ Tested
Give a function an optional argument
Let callers omit a value while keeping nounset enabled.
optional argument✓ 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
Identify the current page in a breadcrumb
HTML: An ordered breadcrumb list sits inside a named navigation region, with aria-current on the current location.
HTML✓ Tested
Insert values into a multiline template
PowerShell: A double-quoted here-string expands variable references.
PowerShell✓ Tested
Keep a decorative icon out of a button’s name
HTML: aria-hidden excludes a decorative character while leaving the visible action text as the accessible name.
HTML✓ Tested
Keep exec-form arguments literal
Docker / Compose: JSON exec form does not expand shell environment variables.
Docker / Compose✓ Tested
Keep function state between calls
C: A static local variable retains its stored value for the lifetime of the process.
C✓ Tested
Keep function-local assignments separate from caller state
PowerShell: Ordinary function assignments create local variables rather than replacing the caller’s variable.
PowerShell✓ Tested