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(scrollable-region-focus): ignore scrollable regions without content #1788

Merged
merged 2 commits into from
Aug 28, 2019

Conversation

straker
Copy link
Contributor

@straker straker commented Aug 27, 2019

hasContentVirtual would always run the aria label check even when the ignoreAria flag was set to true, it also resulted in the entire check always returning true.

The test wanted false but was asserting true.

Closes issue: #1701 (will now properly ignore the scrollable region that doesn't have content)

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner August 27, 2019 17:37
jeeyyy
jeeyyy previously requested changes Aug 28, 2019
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.

Given we are closing the issue on scrollable region focusable. I think we should add some tests for that rule.

@@ -41,7 +41,7 @@ describe('dom.hasContentVirtual', function() {
it('is false if the element has an aria label but `ignoreAria=true`', function() {
fixture.innerHTML = '<div id="target" aria-label="my-label"> </div>';
tree = axe.utils.getFlattenedTree(fixture);
assert.isTrue(
assert.isFalse(
Copy link
Contributor

Choose a reason for hiding this comment

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

Yikes... That was probably me.

@straker straker changed the title fix(has-content-virtual): fix bug with ignoreAria flag fix(has-content-virtual): fix bug with ignoreAria flag that always made it return true Aug 28, 2019
@straker straker changed the title fix(has-content-virtual): fix bug with ignoreAria flag that always made it return true fix(scrollable-region-focus): ignore scrollable regions without content Aug 28, 2019
@straker straker merged commit b36754e into develop Aug 28, 2019
@straker straker deleted the fixContentVirtual branch August 28, 2019 16:38
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.

3 participants