Why is it advantageous or a better practice to create a lengthy CSS ruleset to hide text, when it could be quickly done by specifying the hidden attribute within the span element of the html file, like this:
<label for="birth-date">D.O.B.<span class="sr-only" hidden>(Date of Birth)</span></label>
The hidden attribute removes the element entirely from being rendered. So, it will not be “visible” to screen readers either, which is the whole point of the sr-only class.
Thank you @Sky020, your explanation is clear and logical. I will use the CSS ruleset as shown in the lesson.
I also want to thank you for replying to my question as a staff member. I am subscribed to a paid learning platform as well, where I do not receive such a privilege, astonishingly. I have now made a cash donation to this platform.
I also want you to know that I appreciate your professionalism and dedication.
Please disregard my request to forward a possible issue to the Q.A. team, I was incorrect. Thank you for the further information for questions/suggestion/bug reporting.