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

fix(a11y): add aria-label for links to achieve 100 a11y scores #78

Merged
merged 5 commits into from
Feb 25, 2025

Conversation

kmurugulla
Copy link
Collaborator

Copy link

aem-code-sync bot commented Feb 11, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Feb 11, 2025

Page Scores Audits Google
📱 /block-collection/breadcrumbs PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /block-collection/breadcrumbs PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /block-collection/modal PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /block-collection/modal PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@kmurugulla kmurugulla changed the title fix: add aria-label for links to achieve 100 a11y scores fix(a11y): add aria-label for links to achieve 100 a11y scores Feb 12, 2025
const links = main.querySelectorAll('a');
links.forEach((link) => {
let label = link.textContent;
if (link.querySelector(':scope > span[class*="icon"]')) {
Copy link
Collaborator

@shsteimer shsteimer Feb 12, 2025

Choose a reason for hiding this comment

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

Suggested change
if (link.querySelector(':scope > span[class*="icon"]')) {
if (!label && link.querySelector('span.icon')) {

minor, just a thought.

@kmurugulla kmurugulla merged commit 1240044 into main Feb 25, 2025
4 checks passed
@kmurugulla kmurugulla deleted the a11y-link-labels branch February 25, 2025 22:21
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.

2 participants