Skip to content

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

Closed
@erikkroes

Description

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.

Metadata

Assignees

No one assigned

    Labels

    fixBug fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions