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

Modal - Avoid inappropriate use of ARIA roles, states, and properties - (2036570035) #7801

Closed
dqateam opened this issue Sep 19, 2023 · 3 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 5 A few days of work, definitely requires updates to tests. p - low Issue is non core or affecting less that 10% of people using the library spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.

Comments

@dqateam
Copy link
Collaborator

dqateam commented Sep 19, 2023

Violation:

Avoid inappropriate use of ARIA roles, states, and properties

image

WCAG Reference:

Severity:

5

Media Type:

ARIA


Areas for Remediation:

  • Title: Modal - Avoid inappropriate use of ARIA roles, states, and properties - (2036570035)
  • Module: Modal
    Issue
    There is an element that makes use of ARIA attribute inappropriately.
    Examples include:
  • aria-describedby used on modal unnecessarily that renders out all information of dialog.

User Impact
When inappropriate ARIA roles, states, and/or properties are used, screen reader users will mistake these elements for other control structures or the use may prevent users of assistive technology from interacting with the control.

Code Reference

<calcite-modal class="js-modal-s-s" width="s" scale="s" aria-labelledby="modal-title" aria-modal="true" role="dialog" background-color="white" calcite-hydrated="" aria-describedby="div-8a7145fe-6a57-f11e-3faa-f5a5b486953e" active="" open="">
       ....
</calcite-modal>

Suggestion
Developers must avoid inappropriate use of ARIA roles, states, and/or properties. Remove any unnecessary ARIA attributes.

Compliant Code Example

<calcite-modal class="js-modal-s-s" width="s" scale="s" aria-labelledby="modal-title" aria-modal="true" role="dialog" background-color="white" calcite-hydrated="" aria-describedby="div-8a7145fe-6a57-f11e-3faa-f5a5b486953e" active="" open="">
       ....
</calcite-modal>

Additional Resources:

  • Report Source: Product accessibility evaluation conducted on the Calcite Design System in August, 2022.
@dqateam dqateam added 0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Sep 19, 2023
@geospatialem geospatialem added p - low Issue is non core or affecting less that 10% of people using the library estimate - 5 A few days of work, definitely requires updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Dec 27, 2023
@geospatialem
Copy link
Member

We could explore adding a description property, similar to the accordion-item component, where the aria-describedby could add the component's description, if present.

@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Apr 3, 2024
@geospatialem geospatialem added the spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. label Aug 12, 2024
@geospatialem geospatialem self-assigned this Aug 12, 2024
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Aug 12, 2024
@geospatialem
Copy link
Member

Spike to determine feasibility/need for dialog, if needed and re-scope the above as needed.

@geospatialem
Copy link
Member

In looking at cases with calcite-dialog with/without the modal attribute, the above appears to be mitigated. 🙌🏻

🔜 For the next a11y audit we'll conduct another module for testing, but in initial sleuthing the above is mitigated.

  1. calcite-dialog: <calcite-dialog open heading="A heading" description="A description">

markup: <div aria-description="A description" aria-label="A heading" aria-modal="false" class="dialog dialog--opening-active" role="dialog" style="transform: translate(0px, 0px);">

  1. calcite-dialog with modal: <calcite-dialog open modal heading="A heading" description="A description">

markup: <div aria-description="A description" aria-label="A heading" aria-modal="true" class="dialog dialog--opening-active" role="dialog" style="transform: translate(0px, 0px);">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 5 A few days of work, definitely requires updates to tests. p - low Issue is non core or affecting less that 10% of people using the library spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Projects
None yet
Development

No branches or pull requests

2 participants