Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLD: Accessible labels and localization in Nimble #1272

Merged
merged 17 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Update docs (accessible labels for button/banner/icons)",
"packageName": "@ni/nimble-components",
"email": "[email protected]",
"dependentChangeType": "none"
}
17 changes: 15 additions & 2 deletions packages/nimble-components/docs/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,18 @@ When setting [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Acce

# Component-specific accessiblity notes
msmithNI marked this conversation as resolved.
Show resolved Hide resolved

## nimble-button
When using the `nimble-button` with only an icon, `contentHidden` should be set to `true` and text content should be provided within the button even though it will not be visible on the screen. The button will use the text content to configure the appropriate ARIA attributes internally to ensure the button is adequately accessible with a screen reader.
## Buttons
`nimble-button`, `nimble-anchor-button`, `nimble-menu-button`, `nimble-toggle-button`

When using the Nimble buttons with only an icon, `contentHidden` should be set to `true` and text content should be provided within the button even though it will not be visible on the screen. The button will use the text content to configure the appropriate ARIA attributes internally to ensure the button is adequately accessible with a screen reader.

## nimble-banner
msmithNI marked this conversation as resolved.
Show resolved Hide resolved
When using `nimble-banner`, the title content should always be provided for accessibility. To hide the title visually, `titleHidden` can be set to `true`.

## nimble-dialog
When using `nimble-dialog`, the title content should always be provided for accessibility. To hide the title visually, `headerHidden` can be set to `true`.

## Icons
When using an icon standalone, the `title` attribute should usually be set, to provide accessible text (which will also show as a tooltip).

When using an icon as the content of a Nimble button, place the icon in the `start` slot, and follow the button guidance above.
Loading