Unlike hidden text content in the DOM which does provide an accessible name via
aria-labelledby, hidden CSS
::before/::after text content does not.
I made the mistake of only checking in my browser of choice (Firefox). In Chrome and Edge the situation is worse. Neither provide an accessible name for a control where the
aria-labelledby references an element that has visible CSS
::before text content. And in fact, unlike Firefox, the presence of the
aria-labelledby pointing to an empty element results in the child text of the control being ignored as source of the accessible name.
In summary: Don't