You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though the material docs state that "chips aren't buttons", all the other type of chip map very well onto existing ARIA roles, including button.
Assist and suggestion chips are (semantically) buttons
Filter chips are (semantically) checkboxes
I've seen chips behaving like radio buttons too (selectable, but mutually exclusive within their group)
This leaves "input chip" without a proper mapping. So what are input chips? They represent dismissible filters or selectors previously chosen by the user. They appear in (e.g.) Microsoft outlook when manipulating the email recipient list, but are not uncommon in web-based RIAs as quick filters based on previous interactions with e.g. checkboxes. A good real world example is to be found in ebay, where previous search filters appear as dismissible chips.
Note: These chips are sometimes used to populate drop-down menus. (Screenshot from ebay)
"Input chips" are somewhat similar to checkboxes or toggle buttons, except that they disappear when you click the checkmark. The chip can only be recreated through some other mechanism, typically in some other part of the UI. No other control behaves in quite this way. It's effectively a "single-use" toggle button.
For an implementation with today's ARIA, the button role is probably the best fit (although it's often the checkmark/closebox that behaves as a button, rather than the whole chip or label, since these are often draggable).
However, I don't like the idea of UI elements disappearing without fair warning. This may be a rare case where aria-roledescription might be called for. I also wonder whether aria-checked is at all relevant or appropriate here, since this would at least communicate (programmatically) that there is some kind of Boolean quality about the control, although it would only ever be "true" if the control is present.
inputchip
A common UI element, not well met by the current ARIA spec is the (poorly named) "inputchip" described at https://m3.material.io/components/chips/guidelines
Even though the material docs state that "chips aren't buttons", all the other type of chip map very well onto existing ARIA roles, including button.
This leaves "input chip" without a proper mapping. So what are input chips? They represent dismissible filters or selectors previously chosen by the user. They appear in (e.g.) Microsoft outlook when manipulating the email recipient list, but are not uncommon in web-based RIAs as quick filters based on previous interactions with e.g. checkboxes. A good real world example is to be found in ebay, where previous search filters appear as dismissible chips.
Note: These chips are sometimes used to populate drop-down menus. (Screenshot from ebay)
"Input chips" are somewhat similar to checkboxes or toggle buttons, except that they disappear when you click the checkmark. The chip can only be recreated through some other mechanism, typically in some other part of the UI. No other control behaves in quite this way. It's effectively a "single-use" toggle button.
For an implementation with today's ARIA, the button role is probably the best fit (although it's often the checkmark/closebox that behaves as a button, rather than the whole chip or label, since these are often draggable).
However, I don't like the idea of UI elements disappearing without fair warning. This may be a rare case where
aria-roledescription
might be called for. I also wonder whetheraria-checked
is at all relevant or appropriate here, since this would at least communicate (programmatically) that there is some kind of Boolean quality about the control, although it would only ever be "true" if the control is present.This will require a change to CORE-AAM
A possible change of spec might entail
aria-pressed
converts a button to a toggle)An APG example would be useful
If an addition to ARIA is not desired, an APG example showing how to implement such a chip using the current spec would be valuable.
The text was updated successfully, but these errors were encountered: