Skip to content

[MOL-22883][SV] Remove aria-readonly from location field button - #771

Merged
weili-govtech merged 1 commit into
LifeSG:pre-release/v2from
vuongthanh148:MOL-22883
Oct 14, 2026
Merged

weili-govtech merged 1 commit into
LifeSG:pre-release/v2from
vuongthanh148:MOL-22883

Conversation

@vuongthanh148

Copy link
Copy Markdown

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing apis or functionality to change)
  • Documentation (change to documentation, comments or API descriptions)
  • Tests (improvements to unit tests or E2E tests)
  • Other (technical improvements, refactoring, or changes that don't fall into the above categories)

Description of changes

  • Link to ticket
  • Description of changes

DummyLocationField renders a <button> with aria-haspopup="dialog" and aria-readonly={readOnly}. aria-readonly is not a supported attribute for the button role, so accessibility scans (axe aria-allowed-attr, WCAG 4.1.2) report "ARIA attribute is not allowed: aria-readonly". The attribute was left orphaned when role="combobox" was removed from this element.

This removes aria-readonly from the button. Read-only behaviour is unchanged: LocationField.handleFocus already returns early when readOnly || disabled, so the modal does not open. aria-disabled and aria-haspopup are kept.

The same change is already on main (v3) via the linaria migration; this backports it to the v2 line, where v2.2.9 to v2.2.11 still ship the attribute.

Checklist

  • Changes follow the project guidelines in CONTRIBUTING.md
  • Looks good on mobile and tablet
  • Updated documentation
  • Added/updated unit tests

@weili-govtech weili-govtech added the type: bug Something isn't working label Oct 14, 2026
@weili-govtech weili-govtech added this to the v2-next milestone Oct 14, 2026
@weili-govtech
weili-govtech merged commit ad34738 into LifeSG:pre-release/v2 Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants