Problem/Motivation

The accordion uses aria-multiselectable, but this has been deprecated in USWDS 2.x

Steps to reproduce

Add an accordion to a page and run it through the w3 validator. Compare with official uswds documentation

Proposed resolution

Remove the aria attribute, and replace with data attribute.

Remaining tasks

Add to the default template file.

User interface changes

None

API changes

None

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

devkinetic created an issue. See original summary.

devkinetic’s picture

Issue summary: View changes
devkinetic’s picture

Title: Accordions should use proper aria roles » Remove aria-multiselectable from Accordions

Upon further inspection, USWDS itself does not add the aria-multiselectable attribute, which is what triggers this validation warning in the first place. Further, this issue on foundation confirms that the tree role can cause issues: https://github.com/foundation/foundation-sites/issues/12185 so perhaps the solution is to actually remove aria-multiselectable from the template.

devkinetic’s picture

smustgrave’s picture

Version: 2.2.x-dev » 2.3.x-dev

smustgrave’s picture

Status: Active » Needs review

Thank you for reporting and providing the uswds ticket too for reference.

Take a look at the PR and let me know if that solves it for you.

I targeted the 2.3.x branch as that's what I'm planning for D10. Just waiting for some dependency modules to do a D10 release also.

devkinetic’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, compared the result against USWDS standards for the component.

  • smustgrave committed 1d62aa8 on 2.3.x
    Issue #3316920: Remove aria-multiselectable from Accordions
    
smustgrave’s picture

Status: Reviewed & tested by the community » Fixed
devkinetic’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.