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

Card accessibility tweak #1858

Merged
merged 3 commits into from
Feb 22, 2024
Merged

Card accessibility tweak #1858

merged 3 commits into from
Feb 22, 2024

Conversation

rajsite
Copy link
Member

@rajsite rajsite commented Feb 22, 2024

Pull Request

🤨 Rationale

The card was previously disabled after it started resulting in axe-core completely failing. After reporting to axe-core their comment in dequelabs/axe-core#4335 (comment) made me think we can workaround the axe-core issue by wrapping the slot in a span and targeting that instead for aria.

While not necessary for runtime behavior or accessibility, the workaround adds minimal overhead and complexity. Does not need to be removed after the axe-core fix. Fixes #1650

👩‍💻 Implementation

Wraps the slot in a span and use that as the aria target.

🧪 Testing

Can see the PR has a passing lighthouse score with the card re-enabled.

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@rajsite rajsite marked this pull request as ready for review February 22, 2024 19:25
@rajsite rajsite enabled auto-merge (squash) February 22, 2024 23:32
@rajsite rajsite merged commit b677d6b into main Feb 22, 2024
10 checks passed
@rajsite rajsite deleted the card-accessibility-tweak branch February 22, 2024 23:50
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.

Lighthouse failing with axe-core Error: Cannot read properties of undefined (reading 'actualNode')
4 participants