Skip to content

Hide bit-icon component from screen readers by default #14295

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

BryanCunningham
Copy link
Contributor

@BryanCunningham BryanCunningham commented Apr 15, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/CL-619

📔 Objective

Icons are generally decorative. Want to ensure they are hidden from screen readers unless we explicitly want them to be read.

  • Adds aria-hidden="true" to icons by default
  • Automatically adds aria-hidden="false" when ariaLabel is provided

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

codecov bot commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.18%. Comparing base (3c3a0e6) to head (3ace399).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...wrapper/extension-anon-layout-wrapper.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14295   +/-   ##
=======================================
  Coverage   36.17%   36.18%           
=======================================
  Files        3200     3200           
  Lines       91420    91422    +2     
  Branches    16371    16371           
=======================================
+ Hits        33069    33077    +8     
+ Misses      55993    55987    -6     
  Partials     2358     2358           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Apr 15, 2025

Logo
Checkmarx One – Scan Summary & Detailsae6cfc78-89d0-4da9-8d75-e1913f77c5ac

Fixed Issues (1)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
LOW Angular_Usage_of_Unsafe_DOM_Sanitizer /libs/components/src/icon/icon.component.ts: 21

@BryanCunningham BryanCunningham force-pushed the uif/cl-619/hide-icons-by-default branch from 5af3f6d to 2fb7a08 Compare April 15, 2025 19:13
r-tome
r-tome previously approved these changes Apr 16, 2025
@BryanCunningham BryanCunningham force-pushed the uif/cl-619/hide-icons-by-default branch 2 times, most recently from 1908a7f to f84aa92 Compare April 16, 2025 16:34
Copy link
Contributor

@vleague2 vleague2 left a comment

Choose a reason for hiding this comment

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

I would double-check that the libs/anon-layout component isn't used in the desktop app -- if it is, we'll need to add the translation string there too

@BryanCunningham BryanCunningham changed the title Uif/cl 619/hide icons by default Hide bit-icon component from screen readers by default Apr 16, 2025
@BryanCunningham
Copy link
Contributor Author

I would double-check that the libs/anon-layout component isn't used in the desktop app -- if it is, we'll need to add the translation string there too

@vleague2 As far as I can tell, it is only used in the extension currently

@BryanCunningham BryanCunningham force-pushed the uif/cl-619/hide-icons-by-default branch from 6c68dd6 to 3ace399 Compare April 16, 2025 20:29
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.

4 participants