Add aria-label to filter panel close button - #5
Closed
olitreadwell wants to merge 1 commit into
Closed
Conversation
The desktop "close filters" button in the search results filter panel was an icon-only IconButton with no accessible name. A screen reader announced it only as "button", so users could not tell what it does. Add aria-label="Close filters", matching the pattern already used by the sibling "Clear organization name filter" button in the same file and the "close" button in AnnouncementSnackbar. Also add a Playwright test that opens the filter panel, asserts the close button is reachable by its accessible name, and confirms it closes the panel.
olitreadwell
force-pushed
the
fix/aria_label_filter_panel_close_button
branch
from
August 18, 2026 23:14
c58c180 to
a5aa07f
Compare
Owner
Author
|
Closing as duplicate: the same change was already submitted upstream in hackforla#2851 (CLOSED). See hackforla#2851 |
Owner
Author
|
Superseded by upstream hackforla#2851. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream target
hackforla/food-oasis: no issue; self-found accessibility gap in the search results filter panel.
What changed
Add
aria-label="Close filters"to the desktop close button (icon-onlyIconButton) in the search results filter panel.Add a Playwright test that verifies the button is reachable by its accessible name and closes the panel.
Why
The button at
FilterPanel.tsx:155rendered only a<CloseIcon />with no text and noaria-label, so its accessible name was empty.A screen reader announced it just as "button", giving no hint of its purpose.
The fix follows the file's own convention: the sibling clear-filter button already uses
aria-label="Clear organization name filter", andAnnouncementSnackbarusesaria-label="close".Verified empirically: with the source fix reverted, the new test fails (
getByRole("button", { name: "Close filters" })finds nothing); with the fix, it passes.How to verify
Coverage
N/A: repo has no coverage tool wired up.
The change adds one focused Playwright test to the existing e2e suite.
Checks run locally
npm run lintonly globs**/*.{js,jsx}; this change is.tsx/.ts. The eslint binary is also not installed in the client workspace.npm run typecheck→tsc --noEmit, no errors)npm run build→tsc && vite build, built in ~10s)Style / template compliance
CONTRIBUTING.md has no code-style rules beyond the wiki workflow and no AI policy; there is no PR template in the repo.
The change matches neighbouring code style.
Prettier flags
FilterPanel.tsx, but that warning pre-exists (present with this change stashed) and Prettier leaves the edited line unchanged, so the file was intentionally not reformatted to avoid unrelated churn.Confidence: HIGH
Single-attribute a11y fix plus a test that fails without it.
The
"Close filters"wording is a reasonable label for the panel titled "Filters"; a maintainer may prefer different wording, which is a trivial follow-up.Recommendation
Ready to send upstream as-is (label wording is the only thing a human might tweak).
Promotion note
To open this against upstream once ready:
No CLA or signed-commit requirement was found in
hackforla/food-oasis's CONTRIBUTING.md or.githubconfig (no PR template exists in this repo; the body above follows the CONTRIBUTING.md guidance to route developer contributions through the project's own dev workflow).AI assistance
Drafted with AI assistance.
The gap was found and verified against the current code, the change was verified before opening, and this diff was reviewed line by line.
PROMOTION NOTE (remove this section before/when opening against upstream):
Prerequisites: none outstanding (re-verify CLA/DCO/signing before promoting).