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

Adaptive Cards TextBlock heading should start at level 2 #4747

Merged
merged 8 commits into from
Jun 22, 2023

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Jun 15, 2023

Fixes #4721. Fixes #4726.

Changelog Entry

Fixed

  • Fixes #4721. Adaptive Cards TextBlock heading elements should start at level 2, by @compulim, in PR #4747

Description

Adding a new axe-core to verify there are no heading elements of level 1.

Design

Heading 1 is reserved for page-level heading. Web Chat is a component and should not use heading of level 1.

Specific Changes

  • Updated Adaptive Cards host config with undocumented value of textBlock.headingLevel set to 2
  • Added new axe-core check to make sure we have no <h1> or <anything role="heading" aria-level="1">
  • Removed artificial injection of <h1> in all tests
    • Instead, we disabled the default check of page-has-heading-one
  • Updated VSCode settings to point to correct package of Prettier
  • 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)

@compulim compulim marked this pull request as ready for review June 15, 2023 22:11
@compulim
Copy link
Contributor Author

This PR needs a change on MockBot side to remove header level one from Markdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants