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: Allow only-dlitem / only-listitem to have any hidden content #1098

Merged
merged 2 commits into from
Aug 27, 2018

Conversation

WilcoFiers
Copy link
Contributor

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 >>

@WilcoFiers WilcoFiers requested a review from a team as a code owner August 24, 2018 15:11
Copy link
Contributor

@jeeyyy jeeyyy left a comment

Choose a reason for hiding this comment

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

Lgtm.

Copy link
Contributor

@dylanb dylanb left a comment

Choose a reason for hiding this comment

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

I don't agree with the treatment of aria-hidden

To elaborate: aria-hidden="true" is intended to hide things from the assistive technology. It is not intended to override semantics. role="presentation" is intended to override semantics.

);
});

it('returns false if there are aria-hidden=true elements that normally would not be allowed', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm, I don't agree with this case

);
});

it('returns false if there are aria-hidden=true elements that normally would not be allowed', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I disagree with this

@WilcoFiers
Copy link
Contributor Author

@dylanb I don't understand your point. Assistive technologies treat elements with aria-hidden exactly the same way as they do elements with display: none. The following three lists look and behave exactly the same way as far as I know. That suggests to me that they should all pass.

<ul>
  <template is="dom-repeat">
    <li>{{text}}</li>
  </template>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>
<ul>
  <dom-repeat style="display:none;">
    <li>{{text}}</li>
  </dom-repeat>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>
<ul>
  <dom-repeat aria-hidden="true" style="position:absolute; top:-999em;">
    <li>{{text}}</li>
  </dom-repeat>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>

@dylanb
Copy link
Contributor

dylanb commented Aug 25, 2018

ok, I was mistaken in thinking this was a 4.1.1 rule and not a 1.3.1 rule

@WilcoFiers WilcoFiers merged commit 6034aae into develop Aug 27, 2018
@WilcoFiers WilcoFiers deleted the hidden-listitems branch August 27, 2018 08:11
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.

None yet

3 participants