Well, your specific suggestion is bad. Duplicating Bill in the HTML is stupid.
If something like that is really necessary, then I would go for
<a href="...">Bill <span class="accesshide">(View user profile)</span></a>
(Also, I have no idea how you imagined class="accessshow" would be implemented in CSS.)
Even so, I don't think you are on the right lines. I htink your starting point ("developers seem believe that adding a title attribute to a link provides more information for screen readers") is an incorrect premise.
The main purpose of the title="" is to provide a tool-tip so people can discover more about the link before they click it.
- That works nicely for mouse users on a traditional computer.
- Not so good for tablets with touch screens.
- Screen-readers? I don't know.
But really, what we are saying is this:
- In the UI, as we first encouter at it, we want a nice clean UI with just the user's name (and perhaps a picture).
- And then we feel that it is appropriate to provide a little extra information, to users who what it, to clarify that the link goes to that user's profile (rather than, say, to a picture of their pet cat I suppose).
Notice that those last two bullet points make no mention of which technology the user is using to interract with the UI - and if you can talk about the UI that way, then you are heading in the right directly to build something accessible.
So, for me, there are two questions
- Is the extra information really necessary? Isn't it obvious that in Moodle, a user's name always goes to their profile. (I just checked github. Their profile links are just the username.)
- If we feel extra information is necessary, is there something better than the HTML title attribute, which is designed for this purposes? It is then up to devices like tablets and screen-readers to correctly render that semantic HTML, or is I really necessary to workaround what we consider to be bugs in these devices handling of semantic HTML?