- From: Bristow, Alan <Alan.Bristow@elections.ca>
- Date: Tue, 8 Feb 2022 18:10:13 +0000
- To: Lucy GRECO <lgreco@berkeley.edu>, Guy Hickling <guy.hickling@gmail.com>
- CC: WAI Interest Group discussion list <w3c-wai-ig@w3.org>
- Message-ID: <1644343813601.47787@elections.ca>
A screen reader (SR) announcing "blank" when it hits an empty P is entirely correct. Indeed it is the job of the SR to announce HTML, whether it is good or bad, although if it is bad it may make mistakes or be unable to announce it* (*principle reason why HTML should be well formed). It is the HTML author's job to code valid HTML and so not include empty P tags. As it stands if I am a sight-impaired coder using a SR and I want the SR to help me identify if my CMS is inserting bad markup by leaving empty P tags, then all is good, since it does announce these and I can fix that. If content authors wish visual space, and an empty P tag (or empty any tag) is used for the purposes of adjusting visual spacing, then those content authors need to read up on CSS and the "...separation of structure (or: content) from presentation". https://www.w3.org/standards/webdesign/htmlcss#whatcss? Alan -Alan Bristow Web Programmer Elections Canada alan.bristow@elections.ca ________________________________ From: Lucy GRECO <lgreco@berkeley.edu> Sent: Tuesday, February 8, 2022 12:35 PM To: Guy Hickling Cc: WAI Interest Group discussion list Subject: Re: Empty <P> Tags For Spacing Ce message a été envoyé par un expéditeur externe. Veuillez faire preuve de prudence et ne pas cliquer sur les liens ou ouvrir les pièces jointes à moins de reconnaître l'expéditeur et de savoir que le contenu est sûr. This message was sent from an external sender. Please exercise caution and do not click links or open attachments unless you recognize the sender and know the content is safe. If the screen reader does not pronounce blank for an empty p tag what is it supposed to do when it hits on that empty space blank is the best thing for it to announce On Tue, Feb 8, 2022, 9:32 AM Guy Hickling <guy.hickling@gmail.com<mailto:guy.hickling@gmail.com>> wrote: A couple of comments here have said that screen readers should not announce "blank" for empty paragraphs (which I see on websites in some screen readers, as well as in Pdf documents). But this is the kind of problem that arises when we create bad markup. Basically, any wrong or non-standard or questionable HTML is likely to cause assistive devices to produce poor quality results, as in this case. What a screen reader does is not in our control - and in any case they are unlikely to change very quickly just because we criticise them here! But creating good HTML markup is in our control. Rather than pushing the responsibility for doing right onto others, we should put our own house in order first! So to get back to the question, I would advise against empty elements as best practice, but it isn't a WCAG matter.
Received on Tuesday, 8 February 2022 18:10:32 UTC