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

only-listitems and only-dlitems pick up hidden <dom-repeat> as disallowed child #1021

Closed
erikkroes opened this issue Jul 25, 2018 · 1 comment
Labels
fix Bug fixes

Comments

@erikkroes
Copy link

erikkroes commented Jul 25, 2018

As discussed on slack with @marcysutton and @alice.

When creating a <ul>, <ol> or <dl> using <dom-repeat>, you get a <dom-repeat style="display:none"> inside your list, alongside the listitems. Both only-listitems and only-dlitems report this as an issue, as the <dom-repeat> is not one of the ALLOWED_TAGS in the rule, and it ignores the fact the element is hidden with display:none.
display:none should be taken in consideration as it hides the element from the accessibility tree.

Example

Also, the pass and fail messages are incorrect for both rules. For example, the pass for only-listitems states List element only has direct children that are allowed inside <li> elements. The rule does not check for what is inside <li> elements, but what's inside <ul> or <ol> elements.

@dylanb
Copy link
Contributor

dylanb commented Jul 26, 2018

a very simple fix for this problem would be to ignore display:none items

@WilcoFiers WilcoFiers added the fix Bug fixes label Aug 5, 2018
WilcoFiers added a commit that referenced this issue Aug 27, 2018
)

This change allows any hidden element in ul, ol and dl elements.

Closes #1021 

## 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: << Name here >>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes
Projects
None yet
Development

No branches or pull requests

3 participants