FIND YOUR NEXT FEW LINES

Results for “aria”

Small, practical examples. Search by task or narrow things down below.

100 snippets foundClear filters
HTMLAccessible structure

Expose a disclosure button’s expanded state

HTML: Keep aria-expanded synchronized with the controlled panel’s hidden state.

HTML✓ Tested
C#Data & dates

Format a decimal amount

Use invariant culture to print a C# decimal with two places.

C#✓ Tested
Linux CommandsDates & process utilities

Format a zero-padded numeric label

Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.

Linux Commands✓ Tested
Bash ScriptsFunctions & arguments

Give a function an optional argument

Let callers omit a value while keeping nounset enabled.

optional argument✓ Tested
HTMLAccessible structure

Give a section an accessible region name

HTML: A section becomes a named landmark when its heading is referenced with aria-labelledby.

HTML✓ Tested
HTMLImages & embedded documents

Give an inline SVG an accessible name

HTML: Use a title referenced by aria-labelledby for a meaningful inline vector image.

HTML✓ Tested
HTMLAccessible structure

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
PowerShellStrings & literal text

Insert values into a multiline template

PowerShell: A double-quoted here-string expands variable references.

PowerShell✓ Tested
HTMLAccessible structure

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
Docker / ComposeDockerfile patterns

Keep exec-form arguments literal

Docker / Compose: JSON exec form does not expand shell environment variables.

Docker / Compose✓ Tested
CStructures & function interfaces

Keep function state between calls

C: A static local variable retains its stored value for the lifetime of the process.

C✓ Tested
PowerShellFunctions & parameter validation

Keep function-local assignments separate from caller state

PowerShell: Ordinary function assignments create local variables rather than replacing the caller’s variable.

PowerShell✓ Tested