-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add information about selected element types for Group Block #33976
Add information about selected element types for Group Block #33976
Conversation
Size Change: +1.72 kB (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
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.
It works as expected and the code change looks good to me 👍
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.
Thanks for working on this @getdave!
I was wondering if it makes more sense to extract this to a reusable component since it's already being used by Group
, Query Loop
and Template Part
.. 🤔
bc06936
to
ba3d6ed
Compare
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.
Thanks for iterating on this @getdave! I've left some comments but it's working well!
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.
Thanks for your work Dave! 👍
Description
The group block allows you to select an HTML element to be used as it's TagName. However, there is no inline guidance for the purpose of these elements which could lead to the introduce of a11y issues.
This PR takes a first step of adding a notice which explains a little about the selected element.
Currently the info was gleaned from MDN docs, but I'm open to suggestions and improvements.
In future we could look to scan the document and provide more contextual advice (eg: "We've noticed you already have a
<main>
element in your page" etc.) but for now let's keep things simple.Closes #31502
How has this been tested?
<div>
default.Screenshots
Screen.Capture.on.2021-09-09.at.17-03-45.mov
Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.js
files for terms that need renaming or removal).