Skip to content

fix: A11y improvements#95

Merged
DafyddLlyr merged 2 commits intomainfrom
dp/map-a11y-fixes
Dec 14, 2021
Merged

fix: A11y improvements#95
DafyddLlyr merged 2 commits intomainfrom
dp/map-a11y-fixes

Conversation

@DafyddLlyr
Copy link
Copy Markdown
Contributor

Addresses issues raised in the following two tickets -

Fixes

  • Ensure zoom and reset buttons are 44px x 44px
  • Apply missing pointer: cursor to buttons
    • Presumably the way that the drag and move pointers are set are causing this issue
  • Apply aria-label attribute to controls

image

Ensure zoom and reset buttons are 44px x 44px

Apply aria-label attribute to controls
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 10, 2021

✔️ Deploy Preview for oslmap ready!

🔨 Explore the source changes: ca3e02d

🔍 Inspect the deploy log: https://app.netlify.com/sites/oslmap/deploys/61b70cd9542cb70008a3bac5

😎 Browse the preview: https://deploy-preview-95--oslmap.netlify.app

@DafyddLlyr DafyddLlyr requested a review from a team December 10, 2021 13:44
Comment thread src/my-map.ts Outdated

// Apply aria-labels to OL Controls for accessibility
const olControls: NodeListOf<HTMLButtonElement> | undefined =
this.shadowRoot?.querySelectorAll(".ol-control button");
Copy link
Copy Markdown
Member

@jessicamcinchak jessicamcinchak Dec 10, 2021

Choose a reason for hiding this comment

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

Lit nit: I think within firstUpdated(), it's more standard/comprehensive to use renderRoot rather than shadowRoot - the renderRoot will be the shadowRoot or an element, and still has access to the .querySelectorAll() method.

Docs here for reference https://lit.dev/docs/components/shadow-dom/#accessing-nodes-in-the-shadow-dom

Comment thread src/my-map.ts Outdated
Copy link
Copy Markdown
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

thanks for these improvements!! two minor comments, but happy for this to merge whenever

@DafyddLlyr DafyddLlyr merged commit 94f825b into main Dec 14, 2021
@DafyddLlyr DafyddLlyr deleted the dp/map-a11y-fixes branch December 14, 2021 09:43
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