mozilla / bedrock

Making mozilla.org awesome, one pebble at a time
https://www.mozilla.org
Mozilla Public License 2.0
1.18k stars 919 forks source link

Leadership page modal links use invalid role #15538

Open alexgibson opened 1 day ago

alexgibson commented 1 day ago

Description

There's a small remaining a11y issue on the current /about/leadership page. We should not be using role="button" on a landmark like <article> content - instead it should just be a regular <div>. It seems OK that all descendants are declared as presentational when the role is applied, as only the person's name is read aloud which seems OK.

We should also add aria-controls and aria-expanded, to associate control with the modal element.

axe-core found 1 violation

# Description Axe rule ID WCAG Impact Count
1 ARIA role should be appropriate for the element aria-allowed-role Best practice minor 1

Failed

  1. ARIA role should be appropriate for the element

Learn more

aria-allowed-role

Best practice

Ensure role attribute has an appropriate value for the element

minor

Issue Tags: cat.aria best-practice

# Issue Description To solve this violation, you need to...
1 Element location

<br>#laura-chambers<br>

Element source

<br><article id="laura-chambers" class="vcard has-bio" itemscope="" itemtype="http://schema.org/Person" role="button" tabindex="0"><br>
Fix any of the following:

* ARIA role button is not allowed for given element