Skip to content

chore: add aria fields to locator hours#1155

Merged
k-gerner merged 10 commits into
mainfrom
locator-hours-table-aria-labels
Apr 14, 2026
Merged

chore: add aria fields to locator hours#1155
k-gerner merged 10 commits into
mainfrom
locator-hours-table-aria-labels

Conversation

@k-gerner
Copy link
Copy Markdown
Contributor

This dropdown for the hours table needed additional aria attributes to satisfy an accessibility audit.

Of note, there is one part of the audit that is not addressed here, but I feel is not important for compliance:

The <button> element must be the only child of this heading element.

J=WAT-5492
TEST=manual

@github-actions
Copy link
Copy Markdown
Contributor

Warning: Component files have been updated but no migrations have been added. See https://github.com/yext/visual-editor/blob/main/packages/visual-editor/src/components/migrations/README.md for more information.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 13, 2026

Warning

Rate limit exceeded

@yext-bot has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 44 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 25 minutes and 44 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d98e49ec-f58d-4851-aceb-aea020bb7470

📥 Commits

Reviewing files that changed from the base of the PR and between b75b1a4 and 44ccdbe.

⛔ Files ignored due to path filters (3)
  • packages/visual-editor/src/components/testing/screenshots/Locator/[desktop] latest version multi-pageset default props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Locator/[mobile] latest version multi-pageset default props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/StaticMapSection/[desktop] default props with coordinate - with api key.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (1)
  • packages/visual-editor/src/docs/components.md

Walkthrough

The HoursSection component in LocatorResultCard.tsx was modified to manage accordion expanded state internally. The component now uses the isExpanded state variable and the AccordionItem's onToggle callback to control expansion behavior. Accessibility attributes were added, including stable IDs generated via useId, along with aria-controls, aria-expanded, aria-labelledby, and role attributes to establish proper semantic relationships between the accordion trigger and content elements. The previous implementation lacked controlled expansion state management and explicit ARIA linkages.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains why ARIA attributes were added (accessibility audit requirement) and notes a deliberate exclusion from the audit, directly relating to the changeset.
Title check ✅ Passed The title 'chore: add aria fields to locator hours' directly and accurately describes the main change in the pull request, which focuses on adding ARIA attributes to the accordion component for the hours section in the locator result card.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch locator-hours-table-aria-labels

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@k-gerner k-gerner changed the title chore" add aria fields to locator hours chore: add aria fields to locator hours Apr 13, 2026
Copy link
Copy Markdown
Contributor

@jwartofsky-yext jwartofsky-yext left a comment

Choose a reason for hiding this comment

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

lgtm!

@k-gerner k-gerner requested a review from yextsumo April 14, 2026 14:10
Comment thread packages/visual-editor/src/components/LocatorResultCard.tsx
@k-gerner k-gerner requested a review from asanehisa April 14, 2026 15:42
asanehisa
asanehisa previously approved these changes Apr 14, 2026
Comment thread .github/workflows/unit_test.yml
Comment thread packages/visual-editor/src/fields/FontSizeSelectorField.test.tsx
@k-gerner k-gerner merged commit 9a8b5ab into main Apr 14, 2026
24 of 30 checks passed
@k-gerner k-gerner deleted the locator-hours-table-aria-labels branch April 14, 2026 17:37
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.

3 participants