web accessibility inquiry: is there a way for me to specify how a sequence of characters should be read by screen readers?

specifically, I habitually spell God as 'G?d' (capital G, question mark, lowercase d), and I want a screen reader that encounters it in an HTML document to read it as 'God', if at all possible. this is for a personal project that I plan to make public when I complete it.

#Accessibility #HTML #Web #Religion #Judaism

@VulpineAmethyst the general rule is don't: https://adrianroselli.com/2023/04/dont-override-screen-reader-pronunciation.html

that said, if you really want to (and you may have a better case than some) this is the relevant spec: https://www.w3.org/TR/spoken-html/

@modulux

much appreciated.

and yeah, this is literally the only circumstance I'd do it; both 'Gxd' and 'G-d' are common enough that I would expect screen readers to handle it, but 'G?d' is very much a 'me' thing. (they don't normally read my offline/professional name correctly, either, but basically nobody not familiar with Irish is going to get that without my help anyway, so…I'm used to it.)

@VulpineAmethyst @modulux Screen readers exist to faithfully convey what is written and how. They don't and shouldn't replace "Gxd" or "G-d" with "God" because the user needs to know that the choice to write it that way has been made.

So I don't recommend trying to customise pronunciation here. Users can always customise their own speech dictionary for your content if it can't be written as "God".

Separately, the linked Spoken HTML spec has zero real-world support regardless.

@jscholes @VulpineAmethyst @modulux

For this reason i don't know of a single screen reader/document reader that allows this. Other than the bespoke one i wrote for myself... And that done more to get around flaws in my 20 year old text to speech back end,

@pius @jscholes @VulpineAmethyst @modulux NVDA recently gained an add-on that was supposed to be able to do this, but it had to use some serious hacks to do it involving javascript manipulating the page I think. SSML. I'm unsure if it even works. And in any case I doubt it would support the pronunciation tag as most things don't do IPA. Spoken HTML and Aural CSS are dream specs that someone tried to implement for inclusivity and that never got used by anything, because nobody used them, so screen readers don't, and in many cases technically can't, support them.