mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
fix(a11y): name the catalogue and practitioner combobox triggers
A role=combobox button is not named from its content, so the visible placeholder text left both the vaccine-catalogue trigger and the shared practitioner trigger without an accessible name, and the wrapping field label pointed at an id the button did not carry. Name each from its field label. The practitioner trigger is shared, so the visit form gains the same name. Also settle CSS animations before the accessibility scan and poll the reminder reads in the booster flow: the scan otherwise raced the capture sheet's fade and measured a half-opacity blend as a contrast failure, and the flow read the reminder list before the mint and the re-anchor had propagated. Both wait for the settled state rather than relaxing any assertion.
This commit is contained in:
1 parent
77ba829fcf
commit
34cd41a359
3 files changed
+58
-13
No files matched your search
@@ -67,6 +67,11 @@ export function PractitionerCombobox({
|
||||
variant="outline"
|
||||
role="combobox"
|
||||
aria-expanded={open}
|
||||
// `role="combobox"` is not a name-from-content role: the visible
|
||||
// placeholder span does not give the trigger an accessible name,
|
||||
// so name it from the field's own label. Applies wherever this
|
||||
// combobox is embedded (the visit form and the immunization form).
|
||||
aria-label={t("encounters.form.practitioner")}
|
||||
disabled={disabled}
|
||||
data-slot="encounter-practitioner-trigger"
|
||||
className="min-h-11 min-w-0 flex-1 justify-between font-normal"
|
||||
|
||||
@@ -77,6 +77,11 @@ export function CatalogPicker({
|
||||
variant="outline"
|
||||
role="combobox"
|
||||
aria-expanded={open}
|
||||
// `role="combobox"` is not a name-from-content role, so the
|
||||
// visible placeholder span does not name the control for a screen
|
||||
// reader and the wrapping field label targets an id this button
|
||||
// does not carry. Name it explicitly with the field's own label.
|
||||
aria-label={t("vaccinations.form.catalogLabel")}
|
||||
disabled={disabled}
|
||||
data-slot="vaccination-catalog-trigger"
|
||||
className="min-h-11 min-w-0 flex-1 justify-between font-normal"
|
||||
|
||||
Reference in new issue
Block a user