Repository navigation
[pending ParakhAI-frontend#443] Invite Evaluator dialog a11y labels - #18
Draft
saqibmanan wants to merge 1 commit into
Draft
saqibmanan wants to merge 1 commit into
saqibmanan wants to merge 1 commit into
Conversation
…y labels)
Covers the open dev PR that links the 'Select Evaluator' <select> and the
'Notes (optional)' <textarea> in the Invite Evaluator dialog to their
<label>s. Gated with pending_pr("ParakhAI-frontend#443") so it skips
until the source PR merges.
Proves the fix through Playwright's get_by_label(), which resolves
through the real accessible-name algorithm rather than nearby text, so a
missing htmlFor/id genuinely fails it.
Adds a small Page Object gap fill (click_invite_auditors +
INVITE_AUDITOR_DIALOG locator) since nothing previously opened this
dialog.
Contributor
Author
|
None of these touch anything in this PR's diff. No fix for them exists yet in this repo (checked). Not re-running the full ~20min matrix to confirm flakiness since shard 3's failures are consistent assertion failures, not timeouts — that one looks like a genuine dev-environment issue worth its own investigation, separate from this PR. Generated by Claude Code |
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.
Pending: covers open CivicDataLab/ParakhAI-frontend#443 (head
db9cc7e89c43f437c18e7e7b565a486ab60fd598). Skipped in CI until it merges. Safe to merge before it.Source PR
CivicDataLab/ParakhAI-frontend#443 — open since 2026-07-31, base
dev.What changed (from the diff, not the title)
AuditorInvitation.tsx(the "Invite Evaluator" dialog, opened per model-version from the AI model detail page) has two unlabelled controls: the "Select Evaluator"<select>and the "Notes (optional)"<textarea>each have a<label>rendered visually above them with nohtmlFor, and no matchingidon the control. The PR addshtmlFor="select-evaluator"/id="select-evaluator"andhtmlFor="evaluator-notes"/id="evaluator-notes".The PR description notes it deliberately does NOT touch the
<Select>components in the New Evaluation wizard (already correctly labelled viaopub-ui's internaluseId()), and separately flags two other mislabelled elements (EvaluationConfiguration.tsx'sauditType/auditScopelabel targets andModelSelectionModal.tsx'sevaluator-technicaldouble-label) as out of scope for #443 — those are not covered here either, consistent with the source PR's own scoping.Category added, and why
accessibility— this is purely an a11y/markup fix with no functional behavior change, which is exactly what that marker is for. Noe2eneeded alongside it; nothing about the dialog's actual flow changes.Test added
tests/accessibility/test_auditor_invitation_a11y.py:test_evaluator_select_has_accessible_label— opens the dialog, assertspage.get_by_label("Select Evaluator")resolves to exactly one element.test_notes_textarea_has_accessible_label— same, forpage.get_by_label("Notes (optional)").Why this is a real regression check, not a flipped assertion
get_by_label()resolves through Playwright's actual accessible-name algorithm — the same one assistive tech uses — not a nearby-text heuristic. With nohtmlFor/id, it resolves to zero elements even though the label text sits visibly right above the control; after the fix it resolves to exactly one. That's the real mechanism the bug affects, so this assertion can only pass once the association genuinely exists.Page Object gap filled
Nothing previously opened this dialog. Added:
locators/models_locators.py:INVITE_AUDITOR_DIALOG = "[role='dialog']:has-text('Invite Evaluator')"pages/models_page.py:click_invite_auditors()(click the per-version "Invite Evaluators" link and wait for the dialog),is_invite_auditor_dialog_visible()No raw selectors in the test file itself; it uses the Page Object method to open the dialog and Playwright's own
get_by_label(an accessibility-tree query, not a raw CSS selector) for the actual assertion.Red/green proof — UNVERIFIED, no credentials in this environment
This is the cloud routine's sweep run; it has no
TEST_EMAIL_1/TEST_PASSWORD_1, so it cannot reach the AI Maker dashboard or model detail page at all. Collection and thepending_prgate ARE verified locally:(That skip reason came from a real, unauthenticated call to the GitHub API confirming #443 is still open.)
What a human with credentials must run for the actual red/green proof:
pending_prmarker, run against dev now → expect FAIL (get_by_labelfinds 0 elements on both, current markup has nohtmlFor/id).gh pr checkout 443on ParakhAI-frontend, serve locally per SKILL.md §6 (note: with the stub-auth local-serve setup the header nav won't render, so this specific flow may be easier to verify directly against dev once #443 reaches it, rather than via local serve — flagging that rather than guessing at a workaround) → expect PASS.Label on both tests: UNVERIFIED — not executed, no credentials in this cloud sandbox.
Gaps / follow-ups
click_invite_auditors()helper skips (doesn't fail) if no model/version with an "Invite Evaluators" link is visible — depends on live dev data having an invitable version.EvaluationConfiguration.tsx's danglinghtmlFors,ModelSelectionModal.tsx's double-labelled radio) — they're genuinely separate issues, not part of this diff.