refactor: Enhance Message component accessibility and responsiveness
Description
This PR addresses the accessibility and responsiveness gaps identified in the Message components suite. By shifting from generic div structures to semantic roles and implementing fluid typography, the component now meets modern inclusion standards.
Key Changes:
A11y (Accessibility):
- Added
role="article"to the rootMessagecomponent. - Implemented dynamic
tabIndexfor clickable messages to support keyboard navigation. - Added
aria-selectedandaria-busystates to communicate status to screen readers.
Responsiveness:
- Refactored
message-block-width-fixedusingclamp()to ensure message attachments adapt to mobile, tablet, and desktop viewports. - Introduced fluid font sizes for
message-bodyandmessage-header.
Testing:
- Integrated
jest-axefor automated accessibility audits. - Added unit tests for keyboard focusability and ARIA attribute propagation.
Verification:
yarn testpasses forMessage.spec.tsx.- No
jest-axeviolations detected. - Focus ring visible during keyboard
Tabnavigation.
closes #1819
⚠️ No Changeset found
Latest commit: 60162e68c0b37a264e5638a4acf6b35210d81a06
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Hi Maintainers, Just a gentle follow-up on this PR. All checks are passing, please let me know if any changes are needed from my side. Thanks! @KevLehman , @tassoevan , @ricardogarim , @dougfabris