-
Notifications
You must be signed in to change notification settings - Fork 355
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 CodePen button to menubar-editor and avoid external SVG #1876
Conversation
@zcorpan |
@jongund that seems separate to this change, so I would prefer a separate branch. Thanks! |
The regression test had a failure here which I could reproduce locally, but haven't yet investigated why it happens. |
@zcorpan |
raw.githack doesn't seem to be working at the moment, but the following link should be ok for preview: |
@zcorpan
|
Here is unicode accessiblity info by WCAG Working group. "Description Some versions of assistive technologies will announce CSS generated content, as well as specific Unicode characters. However, because the announcement may be inaccurate aria-hidden="true" is used so it will be ignored by assistive technologies. An on-screen text alternative is added." |
Now I see unicode in Editor menu bar example from File changes. @charset "utf-8"; .menubar-editor [role="menubar"] > li > [role="menuitem"]::after { |
Right. What was there before was an image in The accessible name could be set with |
Changes:
|
47f10a5
to
a983109
Compare
@jongund thanks, addressed now. |
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.
Howard the changes look very good, but the menu "separator" disappears in high contrast modes, so suggest using the same technique as used in the menubar-navigation.html example:
.menubar-navigation [role="separator"] {
padding-top: 3px;
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cline x1='0' y1='6' x2='12' y2='6' style='stroke:black;stroke-width:1' /%3E%3C/svg%3E%0A");
background-position: center;
background-repeat: repeat-x;
}
Also the roles, properties and states table needs to be updated to include the use of aria-hidden
and then add the test to the regression file.
Thanks for your work on this example!
478933f
to
ba08120
Compare
<ul> | ||
<li>Indicates the submenu is open.</li> | ||
<li> | ||
The visual appearance of the expanded state is synchronized with the <code>aria-expanded</code> value using CSS attribute selectors and hidden from screen readers with <code>aria-hidden="true"</code>. |
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.
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.
aria-hidden
needs it's own table row in the table.
Example code:
<tr data-test-id="menu-aria-hidden">
<td></td>
<th scope="row"><code>aria-hidden="true"</code></th>
<td><code>span</code></td>
<td>Removes the character entities used for open and closed icons from the accessibility tree to prevent them from being included in the accessible name of the sort buttons.</td>
</tr>
This will also need a regression test in test\tests\menubar_menubar-editor.js
, something like:
...
const ex = {
...
spanSelector: '#ex1 [aria-hidden]`,
....
}
...
ariaTest(
'Visual character entity for the open or closed state is hidden from AT',
exampleFile,
'menu-aria-hidden',
async (t) => {
await assertAttributeValues(t, ex.spanSelector, 'aria-hidden', 'true');
}
);
Made the suggested changes so please review again when you can @jongund.
Please see #1876 (comment) for my own clarification.
It seems a previous commit was done to update the regression tests for aria-hidden: a983109. |
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.
I put some comments in the conversation related to aria-hidden
documentation and regression testing.
…racter 'BLACK CIRCLE' (U+25CF)
…es' table on the use of aria-hidden
53c8db9
to
b76a134
Compare
I have one question. The only documentation we have on HCM is:
This is substantially less than other examples. Should there be more? I'm not certain which text, if any, from other examples, e.g., switch or radio, where we have recently updated HCM documentation, might be applicable here. If all your feedback has been addressed, please indicate so by changing your review status to approve. |
I can't figure out why regression 1 is failing when it runs against the PR. It passes against the push. |
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.
I've completed editorial changes and review. This is an approving editorial review.
The approach taken here with Unicode symbols in CSS generated content is different from what
menubar-navigation.html
does (which uses inline SVG, without any ARIA attributes). It's further possible to use SVG-in-CSS by usingdata:
URLs, asmenubar-navigation.css
did for the separator (but this patch changes it to a CSSlinear-gradient
to be consistent withmenubar-editor.css
).What are the accessibility implications of using Unicode symbols in CSS generated content? Is it good, acceptable, or bad?
Preview editor menubar in compare branch in raw githack
Preview | Diff