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

Block, Block Section - Ensure custom controls provide proper textual name, role, and state information - (2036569799) #5565

Closed
Tracked by #4599
dqateam opened this issue Oct 25, 2022 · 11 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. ArcGIS Hub Issues logged by ArcGIS Hub team members. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@dqateam
Copy link
Collaborator

dqateam commented Oct 25, 2022

Module:

08 Block & Block Section

Violation:

Ensure custom controls provide proper textual name, role, and state information

image

WCAG Reference:

Instance ID:

2036569799

Severity:

7

Description:

[Issue]
There are accordions without appropriate state information. Examples include:

  • River

[User Impact]
Screen reader users will be unable to determine that these controls expand and collapse content. They will also have difficulty determining whether the controls are currently expanded or collapsed.

[Code Reference]

<button aria-controls="8baa2714-5762-3308-30b8-ee324ecd6671-region" class="section-header toggle" id="8baa2714-5762-3308-30b8-ee324ecd6671-button" name="Expand" aria-label="Expand">
<calcite-icon aria-hidden="true" icon="chevron-right" scale="s" calcite-hydrated=""></calcite-icon><span class="section-header__text">River</span>
</button>

Note:

[Suggestion]
Ensure custom controls provide proper textual name, role, and state information.

For accordions, the following information is expected:

  • Each accordion header must be enclosed in a <button> element.
  • Each of these buttons must be enclosed in a heading element of an appropriate level. The <button> element must be the only child of this heading element.
  • When the panel is visible, the header button must have aria-expanded="true". When it is hidden, the header button must have aria-expanded="false".
  • The button must have aria-controls set to the ID of the panel container.
  • If a panel is visible and locked in the expanded state, its header button must have aria-disabled="true".

Media Type:

Custom Controls

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 Oct 25, 2022
@geospatialem
Copy link
Member

Could be related to a similar solution needed for #5553.

@geospatialem geospatialem added the estimate - 5 A few days of work, definitely requires updates to tests. label Feb 6, 2023
@geospatialem geospatialem added the p - high Issue should be addressed in the current milestone, impacts component or core functionality label Feb 27, 2023
@geospatialem geospatialem removed the needs triage Planning workflow - pending design/dev review. label Feb 27, 2023
@geospatialem geospatialem added the ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. label Apr 4, 2023
@geospatialem
Copy link
Member

Also came up in Map Viewer's accessibility audit.

@geospatialem geospatialem added the research Issues that require additional research in order to resolve or make decision. label May 1, 2023
@geospatialem geospatialem self-assigned this May 1, 2023
@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 May 1, 2023
@justinprather
Copy link

Hub team would like to +1 this issue 👍

@geospatialem geospatialem added the ArcGIS Hub Issues logged by ArcGIS Hub team members. label Jun 28, 2023
@geospatialem
Copy link
Member

After initial R&D a few small modifications are needed, which include:

  1. block:

    • The aria-label should be assigned to the heading (required prop, so should be present), rather than the toggleLabel which doesn't provide context to AT. The aria-expanded boolean provides the expansion/collapsing of the component for context.
    • The title value should either also include the heading prop for context, or be removed as the context its providing (such as "collapsed" is confusing for AT when its read twice - from the aria-expanded attribute)
    • The section element doesn't support aria-expanded, can we update to article (where it is supported)?
  2. block-section:

    • The aria-label, similar to the block should leverage the text prop. Its not a required prop, so we might need to consider a backup to provide context if the text prop isn't added in by users?
    • The button should also be accompanied with an aria-expanded prop (e.g., aria-expanded={toAriaBoolean(open)})
    • The section element doesn't support aria-expanded, can we update to article (where it is supported)?

Moving to the August milestone for next steps and implementation.

@geospatialem geospatialem added 0 - new New issues that need assignment. estimate - 3 A day or two of work, likely requires updates to tests. and removed 1 - assigned Issues that are assigned to a sprint and a team member. estimate - 5 A few days of work, definitely requires updates to tests. research Issues that require additional research in order to resolve or make decision. labels Jul 21, 2023
@justinprather
Copy link

@geospatialem ... with this ticket getting moved to the August milestone, which release might this fix be incorporated into? The August 28 release or the September 25 release, perhaps?

@geospatialem
Copy link
Member

with this ticket getting moved to the August milestone, which release might this fix be incorporated into? The August 28 release or the September 25 release, perhaps?

Great question, @justinprather, and apologies for the confusion on the moving of milestones.

Since the issue was marked as research, the aim for the July milestone was to carry out research to determine feasibility within the current milestone. Since it'll require a bit more effort with affecting two components and some intricacies, we opted to move to next month's release with next week's 1.5.0 release target on the horizon.

However, with the high priority nature of the issue, we are targeting to complete as soon as possible as part of the August release (August 28).

@justinprather
Copy link

Thanks for the specifics, @geospatialem!

@jcfranco jcfranco self-assigned this Aug 21, 2023
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Aug 21, 2023
jcfranco added a commit that referenced this issue Sep 1, 2023
**Related Issue:** #5565 

## Summary

Updated HTML to improve a11y.

**Note**: this removes references to outdated `TEXT` constants, which
were used before translations were built-in.
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Sep 1, 2023
@github-actions github-actions bot assigned geospatialem and unassigned jcfranco Sep 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Installed and assigned for verification.

@geospatialem
Copy link
Member

The block-section is good to go. The block textual name context was not provided with expand/collapse, a follow-up PR is coming shortly.

@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 1, 2023
geospatialem added a commit that referenced this issue Sep 1, 2023
**Related Issue:** #5565

## Summary
Prior to this proposed fix, NVDA and JAWS were only receiving context
that the `block` was expanded or collapsed due to the `title` prop.

Updates include:

- Adds an `aria-describedby` to provide context of the
collapse/expansion in addition to the header (handled via the `id`)
- Adds the `"header"` `id` to the block's `resources.ts`
@geospatialem geospatialem added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Sep 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Installed and assigned for verification.

@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 Sep 1, 2023
@geospatialem
Copy link
Member

Verified with NVDA and JAWS for block and block-section in 1.7.1-next.0.

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. ArcGIS Hub Issues logged by ArcGIS Hub team members. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

5 participants