07-13-2022, 05:40 PM | #31 | |
Resident Curmudgeon
Posts: 73,969
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
One thing I really dislike as it looks really ugly is * * * for the section break. I've even seen this as a graphic. It's ugly no matter what. A line, a fleuron, a symbol, etc work well. Just make it a graphic so you can use alt to describe it. Code:
<div class-"sectionbreak"> <img alt="section break" src="images/sectionbreak.jpg"/> </div> Code:
.sectionbreak { padding-top: 0.8em; padding-bottom: 0.8em; text-align: center; text-indent: 0; } |
|
07-13-2022, 05:44 PM | #32 | |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
What the experts say on using the img tag:
Quote:
|
|
Advert | |
|
07-13-2022, 06:04 PM | #33 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
The trouble, as far as I'm concerned, is that the hr tag gives too much of an indication of a context change, way more than a 3-line space does visually. And I still have no idea what happens in a screen-reader when encountering a hr tag. Accessibility is all very well, but it seems basic information like this isn't itself very accessible to the sighted.
|
07-13-2022, 06:14 PM | #34 |
Resident Curmudgeon
Posts: 73,969
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
<p></p> does not always work. If an hr is what the reading software uses to indication a section break, then have the line show. Don't use <p></p> to add space. Use the CSS for the hr to add the space. and use padding and not margins as margins can break when you get to the bottom/top of the screen.
But I don't see why alt won't work for a section break. |
07-13-2022, 06:16 PM | #35 | |
Resident Curmudgeon
Posts: 73,969
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
07-13-2022, 06:20 PM | #36 | |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
|
|
07-13-2022, 06:25 PM | #37 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
I was under the impression that alt text was meant to be used to describe the image, not what it's being used for. Unless that's different in the context of section break, I'd think using an image's alt text that way wouldn't be a best practice--and of course these also aren't section breaks.
I don't think there is a particularly good solution, because I can't think of any tag that describes something like a timing/pacing beat. For the most part I would think this would be mostly suggested by the content itself, though it's tough to say in this case without an example. But if there's no tag for it, there's no tag for it--and then you're just left to choose from an array of options that are all unsemantic in some way or another, including what you were already doing via CSS. |
07-13-2022, 06:25 PM | #38 | |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
I suppose the hr could also be done in greyscale to reduce its impact somewhat. Last edited by bookman156; 07-13-2022 at 06:29 PM. |
|
07-13-2022, 06:33 PM | #39 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Some books of aphorisms use the § character, a section sign, which is better at least than three asterisks, though no idea how screen-readers deal with it.
|
07-13-2022, 08:09 PM | #40 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Good news. I used the following code on my web-page equivalent of my EPUB code, and took the margin off the p tag, and it looks great, much better than I expected. Glad to know the page is now accessible for the blind. Will adapt for the EPUB in due course:
Code:
hr.transition { margin: 1.5em 40% 1.6em 40%; border-top: 1px solid darksalmon; } |
07-13-2022, 08:38 PM | #41 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
What is the distinction between that and a rule/fleuron, which your original post specifically called out as inappropriate?
Last edited by phillipgessert; 07-13-2022 at 08:41 PM. |
07-13-2022, 08:48 PM | #42 | |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Quote:
The print book of course simply uses a 3-line space, and I hadn't thought of doing it differently for the EPUB until it dawned on me that a 3-line space on an ereader would be indistinguishable from any old space that ereaders may shove in (so I have made widows and orphans 1 also). It is pointless clinging to the usual method of putting a margin on a p tag if it is simply not going to be accessible. So I changed my mind and worked with it to my satisfaction. |
|
07-13-2022, 08:50 PM | #43 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Oh, the original method that I regarded as unacceptable put a width of zero on the hr.
|
07-13-2022, 08:52 PM | #44 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
Well, all’s well that ends well, I guess. Adding an inappropriate semantic element is not an accessibility improvement, but I assume it must have in fact been the appropriate semantic element, and is effectively a section break. And the zero width styling has nothing to do with semantics, so you landed at basically the exact accessibility solution you initially rejected. It happens, of course.
Last edited by phillipgessert; 07-13-2022 at 08:56 PM. |
07-13-2022, 08:56 PM | #45 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
It is not as much of a section break as a normal full length black hr rule.
It's just as semantic as a margin on a p tag though isn't it? What else can you do? I would rather the book appeared fine to the blind since they somewhat transcend the pretty terrible graphic capabilities of ereaders. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Increase Line Space in Calibre 4.2 Viewer | brown.ml | Calibre | 2 | 10-19-2019 11:07 AM |
Space between First and Second line on the Chapters | nadabutamor | Kindle Formats | 19 | 08-26-2018 02:28 PM |
italic at end of line causes next line to start with a space | ebookreadr | Sigil | 29 | 03-20-2017 11:25 AM |
Glo Line space bug with some fonts | sage79 | Kobo Developer's Corner | 5 | 07-09-2015 03:01 PM |
How to increase the line space in CSS | Sylver | Calibre | 3 | 08-08-2010 01:02 AM |