How can a developer ensure that the table caption is visually hidden but accessible to screen readers?
- By setting the display property to none.
- By using a combination of position: absolute; and clip: rect(0 0 0 0);
- By using the aria-hidden="true" attribute.
- By using the visibility property set to hidden.
Simply hiding content using CSS properties like display: none or visibility: hidden will make it invisible to both screen readers and visually. However, using a combination of position: absolute and clip: rect(0 0 0 0) can visually hide the content while still making it accessible to screen readers. This technique ensures that the information remains available to users who depend on assistive technologies.
Loading...
Related Quiz
- The CSS _______ property is used to set the horizontal alignment of inline-block and inline elements.
- To include a predefined subject in an email link, you add ?subject= after the email address in the _____ attribute.
- Can HTML comments be nested?
- How does an internal document link affect the browser's history?
- What considerations need to be taken into account regarding copyrights when embedding YouTube videos on a webpage?