Skip to content

Remove bogus aria-labelledby#3697

Merged
compulim merged 6 commits intomicrosoft:masterfrom
compulim:fix-3676
Feb 4, 2021
Merged

Remove bogus aria-labelledby#3697
compulim merged 6 commits intomicrosoft:masterfrom
compulim:fix-3676

Conversation

@compulim
Copy link
Copy Markdown
Contributor

@compulim compulim commented Feb 2, 2021

Fixes #3676.

Changelog Entry

Fixed

  • Fixes #3676. Activities without text should not generate bogus aria-labelledby, by @compulim in PR #3697

Description

When we render an activity without text content, the aria-labelledby is not needed because it is referencing to the text content which does not exists.

Design

The aria-labelledby is added for accessibility, but in some cases, such as activity without text content, we don't need it. And it's also violating accessibility if we set aria-labelledby without a corresponding element.

Specific Changes

  • Modify StackedLayout.js not to inject the aria-labelledby if not needed
  • Added tests
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Comment thread __tests__/html/accessibility.stackedLayout.withoutText.html Outdated
Comment thread __tests__/html/accessibility.stackedLayout.withoutText.html Outdated
@compulim compulim merged commit 2910c5b into microsoft:master Feb 4, 2021
@compulim compulim deleted the fix-3676 branch February 4, 2021 15:51
@compulim compulim mentioned this pull request Mar 2, 2021
52 tasks
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.

"aria-labelledby" references are referring to IDs that do not exist

3 participants