Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
msmithNI committed Dec 16, 2024
1 parent 304384c commit 012b065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nimble-components/docs/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export const template = html<CoolNewButton>`
When setting [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes) on nimble components, avoid using id-based attributes, such as `aria-labelledby`. The id-based attributes may not behave as expected when used with Shadow DOM components, such as `nimble`.

## Icons in components
When a component includes an icon in the Shadow DOM, consider whether that icon has a meaning that is not otherwise communicated by its surrounding context. If so, then set its `role` to `img` and its `aria-label` to a descriptive label. Note that surrounding context includes ARIA attributes of its containing element. For example, it is not necessary to give an `aria-label` to the expand/collapse icon of a tree item, because that is communicated by setting `aria-expanded` on the item.
When a component includes an icon in the Shadow DOM, consider whether that icon has a meaning that is not otherwise communicated by its surrounding context. If so, then set its `role` to `img`, and its `aria-label` to a descriptive label. Note that surrounding context includes ARIA attributes of its containing element. For example, it is not necessary to give an `aria-label` to the expand/collapse icon of a tree item, because that is communicated by setting `aria-expanded` on the item.

0 comments on commit 012b065

Please sign in to comment.