Skip to content

Conversation

EricCeric
Copy link

@EricCeric EricCeric commented Aug 14, 2020

…so that screen readers do not read that the level is closed

What does it do?

Null check for children of certain level to not write out "aria-expanded=false" since screen readers reads the level to be closed when there is no children beneath the current parent.

Fixes # (issue)

No recorded issue.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • [No ] I have performed a self-review of my own code
  • [Yes] I have commented my code, particularly in hard-to-understand areas
  • [No] Updated documentation (if applicable)
  • [No] Added tests that prove my fix is effective or that my feature works
  • [No] New and existing unit tests pass locally with my changes
  • [-] My changes generate no new warnings

…so that screen readers do not read that the level is closed
attributes['aria-checked'] = partial ? 'mixed' : checked
attributes['aria-level'] = (_depth || 0) + 1
attributes['aria-expanded'] = _children && (expanded ? 'true' : 'false')
_children !== undefined && _children.length > 0

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 6c801ee and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Bug Risk 1

View more on Code Climate.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1499

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 93.985%

Totals Coverage Status
Change from base Build 1495: 0.02%
Covered Lines: 598
Relevant Lines: 619

💛 - Coveralls

@EricCeric EricCeric closed this Aug 14, 2020
@EricCeric EricCeric deleted the fix/null-check-children branch August 14, 2020 10:37
@EricCeric EricCeric restored the fix/null-check-children branch August 14, 2020 10:37
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