-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Action Bar] Add aria-expanded
to expand/collapse button
#7003
Comments
@geospatialem one issue I'm seeing here is that calcite-action already has a Should we maybe refactor this so they can't both be set? Is there some workaround for when the following happens? <button aria-expanded="true" aria-pressed="true">
Toggle
</button> |
That sounds like a good plan forward. It looks like calcite-design-system/packages/calcite-components/src/components/action/action.tsx Line 318 in f199b3c
If so, @driskull - what would you think about removing calcite-design-system/packages/calcite-components/src/components/action/action.tsx Line 302 in f199b3c
|
Yes, correct.
Shouldn't we keep aria-pressed because some of these buttons are toggle buttons. right? |
I think we'll need to setup some time to discuss a plan moving forward here. We already have a property for toggling (active) but we don't have a property for expand status. We would need a new property to handle this because |
Ah, gotcha, thanks for the context - was initially thinking the Concur with your original statement above- we'd want to ensure |
Yes, I agree. We'll have to deprecate |
I guess we would have to add something like: state: "pressed" | "unpressed" | "expanded" | "collapsed"; state: "on" | "off" | "expanded" | "collapsed"; state: "active" | "inactive" | "expanded" | "collapsed"; Would we need to support the |
When something is "expanded" would it get the same background color affordance as when "pressed/active"? |
I guess we could just add an |
I think this needs a design/api discussion before it can move forward. |
aria-collapsed
to expand/collapse buttonaria-expanded
to expand/collapse button
The above is blocked and sending to the freezer 🥶 until accessibility API supports shadow DOM further for implementation. As this is not currently feasible within shadow DOM, since the component relies on an internal Some resources for consideration and checking on the Accessibility object model (AOM), once supported:
|
If we add a property of We could use Maybe we deprecate |
The reason we need a different type for expand is that expand uses aria-expanded instead of aria-pressed |
Summary
Add context to the
action-bar
's expand/collapse button when it is expanded. Surfaced as part of MapViewer's a11y audit in the Spring of 2022.Actual Behavior
Context is provided if the action can be collapsed or expanded. However, no context is provided for AT to know an expansion or collapse has taken place.
Expected Behavior
Announce if the component is expanded or collapsed to AT by adding an
aria-expanded
property (true
/false
) boolean, which provides additional context to AT.Reproduction Sample
https://developers.arcgis.com/calcite-design-system/components/action-bar/#sample
Reproduction Steps
Reproduction Version
1.4.0
Working W3C Example/Tutorial
No response
Relevant Info
No response
Regression?
No response
Priority impact
p4 - not time sensitive
Esri team
Calcite (dev)
The text was updated successfully, but these errors were encountered: