-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAP fauxHeadline and visuallyHiddenHeadline logic #4582
Conversation
Co-Authored-By: Ryan McCombe <ryanmccombe@gmail.com>
…to MAP-hidden-headline-logic
const FauxHeadlineContainer = ({ blocks }) => { | ||
const { script, service } = useContext(ServiceContext); | ||
|
||
const arrayOfFragments = blocks[0].model.blocks[0].model.blocks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use path here
please
}); | ||
|
||
describe('with headline data', () => { | ||
const data = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const data = textBlock('This is a headline!');
MAPs are not live yet, and we're going to do an a11y swarm before they are, so doesn't seem worthwhile holding this PR up for that |
Resolves #4403
Further context: #4150
Related PR: BBC-archive/psammead#2575
Overall change: Explicitly creates seperate blocks
fauxHeadline
andvisuallyHiddenHeadline
for the MAP pages to allow the Headline to be displayed under the AV content while maintaining the semantic use of<h1>
for a11y best practices.Code changes:
fauxHeadline
andvisuallyHiddenHeadline
blocksfauxHeadline
andvisuallyHiddenHeadline
<h1>
using theVisuallyHiddenText
psammead component and renders it above thevideo
block for semantic HTML purposes and a11y best practices<strong>
element using theHeadline
psammead component and renders it below thevideo
block for improved UX visual treatment, this is hasaria-hidden
so it is ignored in the terms of a11yCYPRESS_APP_ENV=local CYPRESS_SMOKE=false npm run test:e2e:interactive
)Testing notes:
As this could severely affect a11y concerns (EG: screen reader users, navigation by heading, etc) we need to test all a11y tools to ensure no regression in behaviour.