Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add role img to app header picker network (#23842)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** To improve the accessibility of our ~Avatar components~, especially when a screen reader is used, we propose adding the role="img" attribute to these components. This enhancement aims to prevent screen readers from reading out the fallback letter, providing a more meaningful and contextually appropriate description. For instance, when tabbing through networks in the extension, the screen reader should announce "S, Sepolia" instead of just "S". This change will ensure our UI is more accessible and user-friendly for individuals relying on screen readers. Upon further investigation with @georgewrmarshall, we came to the conclusion that it is best suited for the issue to be applied to the `app header network picker`. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/23832?quickstart=1) ## **Related issues** Fixes: #23251 ## **Manual testing steps** 1. Turn on your computers screen reader (mac: CMD + F5) 2. Run local build of extension 3. Tab to a component that uses an avatar component (e.g. see screenshot for example component) ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/MetaMask/metamask-extension/assets/8112138/ec6ab28f-8fbf-4cd2-b0ea-787f82d7bcae <!-- [screenshots/recordings] --> ### **After** https://github.com/MetaMask/metamask-extension/assets/26469696/bef063ff-41d7-4738-98b3-625013861d75 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
- Loading branch information