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

feat(rule): New aria-toggle-field-label rule #1450

Merged
merged 10 commits into from
Jun 6, 2019
Merged

Conversation

jeeyyy
Copy link
Contributor

@jeeyyy jeeyyy commented Mar 20, 2019

Ensures elements with one of the below semantic roles has a label.

  • checkbox
  • menuitemcheckbox
  • menuitemradio
  • radio
  • switch
  • textbox

Closes issue:

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 changed the title [WIP] rule (feat): form field label rule (feat): aria-form-field-label Apr 4, 2019
@jeeyyy jeeyyy marked this pull request as ready for review April 4, 2019 13:59
@jeeyyy jeeyyy requested a review from a team as a code owner April 4, 2019 13:59
lib/rules/aria-form-field-label.json Outdated Show resolved Hide resolved
lib/rules/aria-form-field-label-matches.js Outdated Show resolved Hide resolved
lib/rules/aria-form-field-label.json Outdated Show resolved Hide resolved
lib/checks/aria/no-implicit-explicit-label.js Outdated Show resolved Hide resolved
lib/checks/aria/no-implicit-explicit-label.json Outdated Show resolved Hide resolved
lib/commons/aria/is-implicit-label.js Outdated Show resolved Hide resolved
@stephenmathieson stephenmathieson changed the title rule (feat): aria-form-field-label rule(feat): aria-form-field-label Apr 23, 2019
@stephenmathieson stephenmathieson changed the title rule(feat): aria-form-field-label feat(rule): aria-form-field-label Apr 23, 2019
@WilcoFiers WilcoFiers added this to the Axe-core 3.3 milestone Apr 23, 2019
@jeeyyy jeeyyy changed the title feat(rule): aria-form-field-label [WIP] feat(rule): aria-form-field-label Apr 30, 2019
@jeeyyy jeeyyy closed this May 26, 2019
@jeeyyy jeeyyy reopened this Jun 3, 2019
@jeeyyy jeeyyy changed the title [WIP] feat(rule): aria-form-field-label feat(rule): aria-form-field-label Jun 3, 2019
@jeeyyy jeeyyy requested a review from WilcoFiers June 3, 2019 11:15
test/rule-matches/aria-form-field-label-matches.js Outdated Show resolved Hide resolved
test/rule-matches/aria-form-field-label-matches.js Outdated Show resolved Hide resolved
test/rule-matches/aria-form-field-label-matches.js Outdated Show resolved Hide resolved
test/rule-matches/aria-form-field-label-matches.js Outdated Show resolved Hide resolved
test/rule-matches/aria-form-field-label-matches.js Outdated Show resolved Hide resolved
lib/checks/aria/no-implicit-explicit-label.js Outdated Show resolved Hide resolved
lib/checks/aria/no-implicit-explicit-label.json Outdated Show resolved Hide resolved
@jeankaplansky jeankaplansky added the docs Documentation changes label Jun 4, 2019
test/rule-matches/aria-form-field-label-matches.js Outdated Show resolved Hide resolved
<!-- menuitemchecbox -->
<ul role="menu">
<li role="menuitem">Console</li>
<li id="fail8" role="menuitemcheckbox" aria-checked="true">Word wrap</li>
Copy link
Contributor

@WilcoFiers WilcoFiers Jun 5, 2019

Choose a reason for hiding this comment

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

Darnit... I think we made a mistake Jey. Some of these roles are named from contents, and others aren't. This role should pass, because "word wrap" is its accessible name. We may have to break up this rule into two. One for named from author only, and one for named from contents. Here's the breakdown:

Named from Contents

Rule: aria-toggle-field-label
checkbox
menuitemcheckbox
menuitemradio
radio
switch

Named by author only

Rule: aria-input-field-label
combobox
listbox
searchbox
slider
spinbutton
textbox

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@WilcoFiers

As discussed the other Rule (aria-input-field-label) PR is here - #1610, that handles named by author only.

lib/checks/aria/no-implicit-explicit-label.js Outdated Show resolved Hide resolved
test/checks/aria/no-implicit-explicit-label.js Outdated Show resolved Hide resolved
@jeeyyy jeeyyy changed the title feat(rule): aria-form-field-label feat(rule): aria-toggle-field-label Jun 5, 2019
@jeeyyy jeeyyy requested a review from WilcoFiers June 5, 2019 14:41
@jeeyyy jeeyyy requested a review from WilcoFiers June 5, 2019 18:59
@WilcoFiers WilcoFiers changed the title feat(rule): aria-toggle-field-label feat(rule): New aria-toggle-field-label rule Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation changes wai-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants