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

fix: role=radio should not require aria-checked #1448

Merged
merged 3 commits into from
Apr 5, 2019

Conversation

jeeyyy
Copy link
Contributor

@jeeyyy jeeyyy commented Mar 20, 2019

As per ARIA spec, when an element has role=radio, states and properties are derived from the role and do not have be explicitly mentioned.

See - https://www.w3.org/TR/wai-aria-1.1/#radio for more info.

Closes issue:

  • NA

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Has documentation updated, a DU ticket, or requires no documentation change
  • Includes new tests, or was unnecessary
  • Code is reviewed for security by: @WilcoFiers

@jeeyyy jeeyyy requested a review from a team as a code owner March 20, 2019 12:14
@@ -3,6 +3,7 @@
<div role="spinbutton" id="pass3" aria-valuenow="value" aria-valuemax="value" aria-valuemin="value">ok</div>
<div role="heading" id="pass4" aria-level="1">ok</div>
<div role="combobox" id="pass5" aria-expanded="true">ok</div>
<span role="radio" id="pass6">I am BLUE!</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a check to show it doesn't fail when you give it aria-checked please.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... in the rule that checks allowed attributes.

@@ -3,6 +3,7 @@
<div role="spinbutton" id="pass3" aria-valuenow="value" aria-valuemax="value" aria-valuemin="value">ok</div>
<div role="heading" id="pass4" aria-level="1">ok</div>
<div role="combobox" id="pass5" aria-expanded="true">ok</div>
<span role="radio" id="pass6">I am BLUE!</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... in the rule that checks allowed attributes.

@jeeyyy
Copy link
Contributor Author

jeeyyy commented Apr 4, 2019

@WilcoFiers - wai tools need this, so a review/ approval can be handy.

@WilcoFiers WilcoFiers changed the title fix: role=radio has implicit state and props fix: role=radio should not require aria-checked Apr 5, 2019
@WilcoFiers WilcoFiers merged commit 0643cbd into develop Apr 5, 2019
@WilcoFiers WilcoFiers deleted the fix-required-state-and-prop branch April 5, 2019 11:36
@WilcoFiers WilcoFiers added this to the Axe-core 3.3 milestone May 1, 2019
@aweary
Copy link

aweary commented Aug 21, 2019

As per ARIA spec, when an element has role=radio, states and properties are derived from the role and do not have be explicitly mentioned.

If I'm looking at the spec correctly, aria-checked is marked as a required property, not inherited. For required properties, the spec states:

States and properties specifically required for the role and subclass roles. Content authors MUST provide a non-empty value for required states and properties.

@WilcoFiers @JKODU it seems like this should still be marked as required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants