Oh I see! The highlight is done with quotes or backticks I believe so I thought it would be accessible (question to @bbsmooth). Maybe there is a setting that can be used.
I’ve been an advocate for moving inline text that is supposed to be added by the user into a separate paragraph of its own for quite a while now and this is just another example of why it would be a good idea. Currently, the text is wrapped in the HTML code element, which as far as I know most screen readers completely ignore. I’ve been searching to see if NVDA can be configured to recognize the code element but no luck so far. @techexplorers please let me know if I am wrong. Thus, the screen reader will just read whatever is in the code element as a natural part of the sentence and thus it may be very hard to tell where the text you are supposed to add to your HTML begins and ends.
I’m not sure they want to use quotes around the string though as I’m guessing they are afraid people will accidentally include the quotes in the HTML. @techexplorers do you think putting this text in a separate paragraph with a clear lead in, such as “Add the following text to the HTML” would make this more accessible for you? Or do you have another suggestion?
“please let me know if I am wrong. Thus, the screen reader will just read whatever is in the code element as a natural part of the sentence and thus it may be very hard to tell where the text you are supposed to add to your HTML begins and ends.”
Yeah exactly.
“do you think putting this text in a separate paragraph with a clear lead in, such as “Add the following text to the HTML” would make this more accessible for you? Or do you have another suggestion?”
That could work or just adding the code in a separate line would be also a solution
“I’m not sure they want to use quotes around the string though as I’m guessing they are afraid people will accidentally include the quotes in the HTML.”
Well I am not sure but usually that’s how some websites do it