Skip to content

Commit d8ceb72

Browse files
alexprutyangshun
authored andcommitted
CSS - Question expansion: What are the different ways to visually hid...? (yangshun#80)
1 parent df43d84 commit d8ceb72

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

front-end/interview-questions.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,16 @@ These techniques are related to accessibility (a11y).
335335
- `width: 0; height: 0`. Make the element not take up any space on the screen at all, resulting in not showing it.
336336
- `position: absolute; left: -99999px`. Position it outside of the screen.
337337
- `text-indent: -9999px`. This only works on text within the `block` elements.
338+
- Metadata. For example by using Schema.org, RDF and JSON-LD.
339+
- WAI-ARIA. A W3C technical specification that specifies how to increase the accessibility of web pages.
338340

339-
I would go with the `absolute` positioning approach, as it has the least caveats and works for most elements.
341+
Even if WAI-ARIA is the ideal solution, I would go with the `absolute` positioning approach, as it has the least caveats, works for most elements and it's an easy technique.
342+
343+
###### References
344+
345+
- https://www.w3.org/TR/wai-aria-1.1/
346+
- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA
347+
- http://a11yproject.com/
340348

341349
### Have you ever used a grid system, and if so, what do you prefer?
342350

0 commit comments

Comments
 (0)