Replies: 1 comment 4 replies
-
converted to a discussion because this is not an issue with wcag. this sounds like an opacity 0 or .001 you could even forego using the adding new elements to the HTML specification is not easy - particularly if what's being proposed is duplicative of available features where the only difference is style. since there are other ways to do this with CSS or ARIA, or other HTML / a11y mapping semantics that can provide a similar outcome (ie the named container role semantics i was mentioning), those are probably your best bet. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Please let me know in which w3c repository to move this issue if this is a bad place. I'd like to talk about an accessibility problem with current HTML markup regarding digital literature. I came across this while programming my own EPUB export functionality.
Problem
EPUB is an e-book standard based on HTML and CSS. It seems to be the most widely adopted standard for digital literature, and therefore reaching a wide range of audiences even outside of the typical techie users.
Apparently, there's a need for an invisible but semantically meaningful
<hr>
variant for ebook publishing. All e-books I have test opened don't annotate a scene break in a way that screen readers understand. Scene breaks separate two separate sections in a fiction novel, commonly to indicate a time gap and a potential change in location, time, cast, and even point of view character, but without starting a new chapter.(In non-fiction documents, like this GitHub issue, I don't think they're used as commonly and instead a new subsection will have a new separate headline to clearly indicate that a new topic is being discussed.)
Problem example in the wild
Here is an example of a scene break:
The common industry standard to do this seems to be the following markup:
And then a CSS rule will be specified for the class
first-after-scene-break
to add a top margin before that paragraph.This apparently isn't picked up or understood by screen readers as a scene break, which is bound to lead to major reader confusion.
Why alternate solutions available so far don't seem to work
You might see when studying the EPUB Accessibility Publishing Knowledge Base that HTML/CSS doesn't seem to currently fulfill this need, with the following issues apparently being present as discussed in the downstream issue:
A basic
<hr>
works semantically and seems to serve a similar purpose, but from my own experience poses problems with the typography. It's simply the case that almost no fiction novel ever draws a visible line between scenes.Not only is this an aesthetic problem, but it would potentially confuse readers that rely on the visual representation to match what they're expecting. That in itself would be kind of an accessibility problem.
One suggested workaround is an equivalent to
<hr style="width:0px; margin-top:0.5em; margin-bottom:0.5em; margin-left:0px; margin-right:0px;">
. The problem here seems to be that automated software like screen readers or also search engine web crawlers etc. will apparently sometimes assume, and in my opinion that's not too far-fetched, that a hidden element is also intended to be semantically ignored.This means that the aesthetic and visual representation needs would be met, but screen readers might again skip over the scene break, making the scene unintelligible to readers with accessibility needs.
Also see here, regarding zero width: it says "text may be read", which is a problem. The reason here is likely that it's not semantically clear if an element hidden in that way should be treated as being presented to the user or not.
Another suggested workaround is
<hr style="opacity: 0;">
but apparently this has inconsistent reading system support. This in my opinion kind of makes sense since e-books are often read on e-book readers that often use e-paper with high visual latency and very low spec hardware. As a result, often advanced effects like transparency, javascript, transformations, and so on might be left out in the software, since any advanced visual effects may not be successfully handled or displayed as intended anyway. This seems like a reasonable trade-off if you ask me.Possible solutions
I can think of two ways to address this in the long term, but I'm sure other people here will have better ideas:
Introduce a new element, like I don't know,
<ihr>
for "invisible hr", or whatever the name might be. This is also useful for web pages and not just e-books, where paragraph breaks might be used inside a document as well. If anything, it could be useful for showing common fiction book preview excerpts on a web page.One way could be a generic CSS rule alternative to
display:none
that both maintains the space and semantic meaning, but doesn't rely on supporting any more advanced transparency or fading effects commonly not present in e-book reading systems.I'm not sure this makes much sense however, since I can't think of any other element where the presence of its mere empty boundaries, it would still have as much of a semantic meaning as an "invisible hr". Like, what logical intention would a hidden-but-semantically-meaningful
<div>
really express? But perhaps if there are other examples of this that make sense, this could be a good idea.I would love to hear other ideas. My apologies if I presented this issue poorly or in the wrong space.
Beta Was this translation helpful? Give feedback.
All reactions