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

Implement an action indicator with icon color override with screen reader context (active/inactive) #4813

Closed
geospatialem opened this issue Jun 28, 2022 · 6 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. p - high Issue should be addressed in the current milestone, impacts component or core functionality research Issues that require more in-depth research or multiple team members to resolve or make decision.

Comments

@geospatialem
Copy link
Member

geospatialem commented Jun 28, 2022

Summary

Screen readers should receive confirmation of the actions state (active/inactive).

Additional issues stemmed from this issue include #5003, #5005

(Some additional issues for consideration: #1220, #3950)

Actual Behavior

Context of the active property is not provided to screen reader users.

Expected Behavior

Provide screen reader context based on the active prop (e.g., action / button is active) using aria-selected, or similar.

Reproduction Sample

https://codepen.io/geospatialem/pen/QWmWdoQ

Reproduction Steps

  1. Open the Codepen sample
  2. Keyboard in or mouse over the second action (speaker) to depict the difference between an active state vs :focus/:active/:hover states.

Reproduction Version

1.0.0-beta.83

Working W3C Example/Tutorial

No response

Relevant Info

No response

Regression?

No response

@geospatialem geospatialem added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. a11y Issues related to Accessibility fixes or improvements. p - high Issue should be addressed in the current milestone, impacts component or core functionality 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Jun 28, 2022
@geospatialem geospatialem added this to the Sprint 07/25 - 08/05 milestone Jul 22, 2022
@geospatialem geospatialem removed the needs triage Planning workflow - pending design/dev review. label Jul 22, 2022
@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Aug 11, 2022
@geospatialem geospatialem self-assigned this Aug 11, 2022
@geospatialem geospatialem added research Issues that require more in-depth research or multiple team members to resolve or make decision. 0 - new New issues that need assignment. and removed 2 - in development Issues that are actively being worked on. labels Aug 11, 2022
@geospatialem geospatialem removed their assignment Aug 11, 2022
@geospatialem
Copy link
Member Author

geospatialem commented Aug 11, 2022

Some additional discussion is needed to proceed.

Additional context provided by @macandcheese from #5139 (comment):

I think the issue is that [action] can be used in multiple ways.

If you were to use it alongside other actions, in a group, bar, or pad - an app needs to manage which is active. This would be a menu item or potentially more of a radio group type of interaction, even if the action itself doesn't have knowledge of the other action's states.

It can also be used as a toggle, individually from other actions (dark mode on / off) - this is where the toggle / checkbox role seems like it could apply

It sounds like to me, the aria-pressed could be keyed off of the active prop - even if the action component itself doesn't manage that.

Enter / Space could still be applicable even when there isn't an "active" state associated in the UI - for instance, a "Save" action - this would be interacted by click, enter, space, but wouldn't have a visual representation once clicked.

@driskull
Copy link
Member

I think this issue needs more discussion and direction before we can do anything.

We have an active property which is probably better representative of aria-selected. But since action is a role of button I think we have to use aria-pressed here in order to not misuse aria attributes.

I'm not sure what aria attribute indicator would map to exactly.

@driskull
Copy link
Member

driskull commented Dec 1, 2022

@geospatialem can you research what we should do for indicator? Maybe just an update label or something?

@driskull driskull self-assigned this Dec 1, 2022
@driskull driskull added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Dec 1, 2022
@Elijbet Elijbet added estimate - 3 A day or two of work, likely requires updates to tests. and removed estimate - 3 A day or two of work, likely requires updates to tests. labels Dec 2, 2022
driskull added a commit that referenced this issue Dec 6, 2022
…rops (#5875)

**Related Issue:** #4813

## Summary

fix(action): Add screen reader support for `active` and `indicator`
properties. #4813

- Uses `aria-pressed` to describe toggle state for `active` property
- Uses `aria-live` region to describe `Unsaved changes` for `indicator`
property
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Dec 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

Installed and assigned for verification.

driskull pushed a commit that referenced this issue Dec 7, 2022
)

**Related Issue:** #4813 

## Summary

This PR will enable built-in translations for `indicator` text in
`calcite-action`.
geospatialem added a commit that referenced this issue Dec 8, 2022
…5938)

**Related Issue:** #4813  

## Summary
Updates the action component's `indicator` and `intlIndicator` prop
descriptions.

cc: #5875, #5895

Co-authored-by: Ben Elan <[email protected]>
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Dec 9, 2022
@geospatialem
Copy link
Member Author

Verified in next.662.

JAWS transcript:

Item 1 (indicator present) �Toggle button� �Pressed� 
To toggle the state press spacebar.
Item 2 �Toggle button� 
To toggle the state press spacebar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. p - high Issue should be addressed in the current milestone, impacts component or core functionality research Issues that require more in-depth research or multiple team members to resolve or make decision.
Projects
None yet
Development

No branches or pull requests

4 participants