-
Notifications
You must be signed in to change notification settings - Fork 3
Add is_sectioning check to Card and Overview
#1936
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
Conversation
This PR updates the template for the Card component and Overview object to check if `tag_name` is a sectioning element like `article` or `section`, and then change the default for `header_tag_element` and `footer_tag_element` to either `header`/`footer` or `div`. This avoids an issue when `header` elements are rendered in a `div`, it causes useless "banner" landmarks to display in the VO Rotor.
🦋 Changeset detectedLatest commit: 7b02ae2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for cloudfour-patterns ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
gerardo-rodriguez
left a comment
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.
Nice work, @spaceninja! 🎉
Paul-Hebert
left a comment
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.
Overall this looks good. Left a few nits inline.
Out of curiosity are there use cases where we're using Overview as something other than a section? Or are we just making this change to be safe?
0d0f3e4
Co-authored-by: Paul Hebert <paul@cloudfour.com>
Co-authored-by: Paul Hebert <paul@cloudfour.com>
Yeah, it was part of the changes in https://github.com/cloudfour/cloudfour.com-wp/pull/778 |
Cool! Carry on then 👍 |
Paul-Hebert
left a comment
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.
🚢
Overview
This PR updates the template for the Card component and Overview object
to check if
tag_nameis a sectioning element likearticleorsection, and then change the default forheader_tag_elementandfooter_tag_elementto eitherheader/footerordiv.This avoids an issue when
headerelements are rendered in adiv,it causes useless "banner" landmarks to display in the VO Rotor.
Testing
Confirm tests pass on this PR.
Review the Card and Overview stories on the preview deploy. There should be no visual changes.
headerorfooterin Cards usingdiv#1934