I'm evaluating some code for a client and have come across spots in their HTML where they are rendering input
fields that have the readonly
attribute and a static value
. The data in these fields will never be editable on the page in question, so my thought is that they should not be input
fields in the first place because it seems semantically incorrect, but more importantly, could cause issues for people that use screen readers. I know that with an input
, even a read only one, you get the ability for the element to get the focus, but that usability is not relevant here.
I have found this question that asks the same thing, but it was from 2013, only one person responded, and it didn't seem like an authoritative answer.
Are there definitive standards or best-practices for how to render data that may have originally come from user input, but is now being rendered read-only that relate to accessibility?