I have an informational span, specifically, a span full of stars that represent a rating (star icons that can be filled or unfilled). As is, it shouldn't be visible at all to a screen reader, since there is no text to read, but the information is important to a user. I'm thinking of putting a label in that's only visible to screen readers. From the MDN docs, that seems like it's okay, since they say it
represents a caption for an item in a user interface
and there is language that says it "can" be associated with a control, but none that it must be.
That makes sense, since you can associate a label with a (as @Jukka notes,
fieldset as well as an
input, but I'm not sure if that extends out to labeling a span.
label is not appropriate for
fieldset, I was thinking of
Is labeling a span with equivalent information sufficient for a screen reader to see and use it? Is that bad practice?