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(required-children): add combobox > listbox exception #559

Merged
merged 3 commits into from
Oct 18, 2017

Conversation

isner
Copy link
Contributor

@isner isner commented Oct 4, 2017

No longer requires a collapsed combobox to own a child listbox.

The relevant ARIA 1.1 spec: https://www.w3.org/TR/wai-aria-1.1/#combobox

#548

No longer requires a collapsed combobox to own a child listbox

#548
@isner
Copy link
Contributor Author

isner commented Oct 6, 2017

Please hold off on merging this for a short while. I want to add a commit that will close #549.

Done.

Allows role=textbox child to be missing from <input type=search role=combobox> parent

Closes #549
@@ -51,7 +51,7 @@ function missingRequiredChildren(node, childRoles, all, role) {

// remove 'textbox' from missing roles if combobox is a native input
var textboxIndex = missing.indexOf('textbox');
if (textboxIndex >= 0 && node.tagName === 'INPUT' && node.type === 'text') {
if (textboxIndex >= 0 && node.tagName === 'INPUT' && ['text', 'search'].indexOf(node.type) >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there are probably other types that make sense too.

Copy link
Contributor Author

@isner isner Oct 9, 2017

Choose a reason for hiding this comment

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

Good point. Which other types are you thinking of? To me, the only other types that seem reasonable to use as the basis of a combobox are "email" and "url". Beyond that, "tel" might be worth supporting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added "email", "url", and "tel" to the excepted input types.

… > textbox

Allows role=textbox to be missing from <input type=email|url|tel role=combobox>

Related to #549
@WilcoFiers WilcoFiers merged commit 8d0991f into develop Oct 18, 2017
@dylanb dylanb deleted the combobox-listbox branch March 8, 2018 19:00
mrtnvh pushed a commit to mrtnvh/axe-core that referenced this pull request Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants