Check for duplicates
Problem
No response
Request
Icon (not IIcon since these are default implemented methods) will be updated with the following API changes:
/**
* Recomputes the ARIA label and role for this icon. This is automatically called
* during initialization, but implementations may find it useful to call this if
* the icon's label should be changed.
*/
protected updateAriaContext()
/**
* Returns the ARIA label to use for this icon (defaults to null). Note that this
* method will only be called during initialization by default, so dynamic changes
* to the icon's ARIA label need to be applied by calling updateAriaContext.
*
* @returns The ARIA label to use for this icon, or null to use a default.
*/
protected getAriaLabel(): string | null
This follows the same design strategy as Bubbles including defaulting the label to 'Icon' if no override is provided. By default, Icons are given the role button as it best fits their interactive nature. Specific icons will have support implemented:
- MutatorIcon
- getAriaLabel: return a localized 'Close Mutator' or 'Open Mutator' based on whether the bubble is visible.
- Call updateAriaContext at the end of setBubbleVisible.
- WarningIcon
- getAriaLabel: return a localized 'Close Warning' or 'Open Warning' based on whether the bubble is visible.
- Call updateAriaContext at the end of setBubbleVisible.
- CommentIcon
- getAriaLabel: return a localized 'Close Comment' or 'Open Comment' based on whether the bubble is visible.
- Call updateAriaContext at the end of setBubbleVisible.
Alternatives considered
No response
Additional context
No response
Check for duplicates
Problem
No response
Request
Icon (not IIcon since these are default implemented methods) will be updated with the following API changes:
This follows the same design strategy as Bubbles including defaulting the label to 'Icon' if no override is provided. By default, Icons are given the role
buttonas it best fits their interactive nature. Specific icons will have support implemented:Alternatives considered
No response
Additional context
No response