Skip to content

fix: postcode-search & address-autocomplete should set tabindex="0"#122

Merged
jessicamcinchak merged 1 commit intomainfrom
jess/tabindex
Mar 23, 2022
Merged

fix: postcode-search & address-autocomplete should set tabindex="0"#122
jessicamcinchak merged 1 commit intomainfrom
jess/tabindex

Conversation

@jessicamcinchak
Copy link
Copy Markdown
Member

@jessicamcinchak jessicamcinchak commented Mar 23, 2022

am experiencing some unexpected screenreader behavior during planx integration, hoping tabindex="0" will smooth it out! we were already setting tabindex on the main map div and that component is read out as expected by my screenreader, so I'm fairly hopeful here.

this 2014(!) blog reassures that elements rendered in the shadow DOM (as these web components are when integrated into our React frontend) should simply be part of "one happy tree" as far as screenreaders are concerned 🌳

a few other minor fixes here too:

  • clarify types & code comments
  • better error handling

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 23, 2022

Deploy Preview for oslmap ready!

Name Link
🔨 Latest commit f59d6a9
🔍 Latest deploy log https://app.netlify.com/sites/oslmap/deploys/623ad30f4fc64d0008761f8b
😎 Deploy Preview https://deploy-preview-122--oslmap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

if (data.error || data.fault) {
this._osError =
data.error?.message ||
data.fault?.faultstring ||
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

One common example of when OS returns a faultstring is if there's an invalid API key, like this:
<address-autocomplete postcode="SE5 0HU" osPlacesApiKey="fake" />

@jessicamcinchak jessicamcinchak requested a review from a team March 23, 2022 08:01
@jessicamcinchak jessicamcinchak changed the title fix: postcode-search & address-autocomplete should have tabindex="0" fix: postcode-search & address-autocomplete should set tabindex="0" Mar 23, 2022
Copy link
Copy Markdown
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

All looks good 👍

@jessicamcinchak jessicamcinchak merged commit 1c0ad0f into main Mar 23, 2022
@jessicamcinchak jessicamcinchak deleted the jess/tabindex branch March 23, 2022 14:28
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.

2 participants