-
Notifications
You must be signed in to change notification settings - Fork 123
Conversation
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.
Unfortunately modifying the <p>
breaks it from having editable attributes. Editing it like so in the editor results in unexpected content as well.
CleanShot.2023-08-28.at.10.16.30.mp4
@MaggieCabrera Maybe there's a way in core to allow aria-hidden in the paragraph, without all the disruption? We likely don't need a UI for it, but would be nice to apply it manually and the other attributes still function. |
@richtabor in this case, would it be better to have an image for this item as proposed by @jessynd in the issue ticket? |
What if we used the site logo + site title blocks? |
I like the idea of having the glyph though, and I think it's legitimate to have the ability to do so. I wonder if something like this should live under the advanced tab in the editor like we have the option to change the html tag from div to something else. In any case, I'm going to investigate if there are GB issues open for this, and worse case scenario we go with the image idea as a plan B if there are no ways in core to have the glyph be accessibly hidden |
What about using the HTML block? |
It probably should be the site logo + title. I don't imagine folks would want a random glyph in their footer, but would want their logo. It's almost a placeholder for logo at the moment anyhow. |
I agree that it makes sense for the site header and site footer parts. |
Yea, header and footers for sure. The HTML block isn't great for this though. The preview will show the HTML editor and the page will look broken. |
Well, there is "Allow setting default (to) preview for HTML blocks" WordPress/gutenberg#40913 |
@beafialho I would love your opinion on this. @scruffian yours too for a technical perspective |
The only reliable way to solve this issue is to not use unicode characters for icons to start with. Uniocode characters are text. Text is read out by screen readers, typically by announcing the character name based on the Unicode characters table. Also, unicode characters are rendered slighly different depending on the operating system and the browser in use. Overal, I'd think using unicode characters is less than ideal also visually. There is a reason why in the Editor and in other themes we're using SVG icons instead. I'd recommend to consider how to switch to SVGs. |
If we want to use svg's, but also can't use the HTML block, the only way to do that is to add them with CSS only, and the styles with the stars could be custom block styles (aka block style variations).
|
I'm afraid I can't provide a technical perspective. If it's needed, the icons can be SVG. I thought that wasn't possible in the editor though. |
One option could be to use a SVG, which would work if we merge this old PR: WordPress/gutenberg#40496 |
+1 for SVGs. What can we do to push this forward in the Gutenberg repo @scruffian? |
We'd need to keep looking into the icon block work: WordPress/gutenberg#16484 |
@scruffian That seems unlikely to land in 6.4. Do you think we could get aria-hidden as a valid HTML property on the RichText content instead? That potentially feels small enough to make it in time. |
@scruffian Pinging you again for some feedback on @richtabor's last question, regarding the RichText content. Is this something we could push forward to be implemented in 6.4? |
I experimented a bit with adding an SVG to the separator block with CSS but the coloring does not work: We need it in different colors for the style variations. |
I just did the same here and it worked for me with some CSS magic. Please have a look and let me know what you think |
The star decorative elements were being read by screen readers. I applied the missing
aria-hidden="true"
attribute.