Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

psammead-brand forwardRefs to SvgWrapper #4426

Merged
merged 3 commits into from
Mar 12, 2021

Conversation

HarryVerhoef
Copy link
Contributor

Resolves bbc/simorgh#8855

Overall change: Makes changes to the psammead-brand and psammead-consent-banner component so that focus for these components can better be managed in Simorgh.

Code changes:

  • Wraps the psammead-component in a forwardRef.
  • Places the ref on the SvgWrapper styled component, instead of on the link, since the link is conditionally rendered.
  • Adds the tabindex="-1" attribute to the SvgWrapper so that it can be focussed without disrupting the tab order.
  • Adds a test to check that the SvgWrapper can be focussed using the ref when no url is given to the Banner.
  • Ref naming changes.

  • I have assigned myself to this PR and the corresponding issues
  • Automated jest tests added (for new features) or updated (for existing features)
  • This PR requires manual testing

@HarryVerhoef HarryVerhoef self-assigned this Mar 11, 2021
@HarryVerhoef HarryVerhoef added a11y Accessibility-related task ws-articles Tasks for the WS Articles Team labels Mar 11, 2021
@github-actions
Copy link

Checkout your storybook preview here http://psammead-preview.tools.bbc.co.uk/4426

Copy link
Contributor

@simonsinclair simonsinclair left a comment

Choose a reason for hiding this comment

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

This is super work, Harry. I've left a few minor comments below!

Copy link
Contributor

@simonsinclair simonsinclair left a comment

Choose a reason for hiding this comment

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

@simonsinclair simonsinclair merged commit 2ac6136 into latest Mar 12, 2021
@simonsinclair simonsinclair deleted the canonical-banner-focus-components branch March 12, 2021 10:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y Accessibility-related task ws-articles Tasks for the WS Articles Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NVDA doesn't read consent banner on page load
2 participants