contents: improve some answers
This commit is contained in:
parent
a2304c71b7
commit
5d112d120b
|
|
@ -154,7 +154,7 @@ These techniques are related to accessibility (a11y).
|
|||
|
||||
- `width: 0; height: 0`. Make the element not take up any space on the screen at all, resulting in not showing it.
|
||||
- `position: absolute; left: -99999px`. Position it outside of the screen.
|
||||
- `text-indent: -9999px`. This only works on text within the `block` elements.
|
||||
- `text-indent: -9999px`. This only works on text within the `block` elements. This is a widely used and famous trick, but it comes with [some downsides](https://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/) like causing performance issues, so you might want to consider using `text-indent: 100%` instead.
|
||||
- Meta tags. For example by using Schema.org, RDF, and JSON-LD.
|
||||
- WAI-ARIA. A W3C technical specification that specifies how to increase the accessibility of web pages.
|
||||
|
||||
|
|
@ -165,6 +165,7 @@ Even if WAI-ARIA is the ideal solution, I would go with the `absolute` positioni
|
|||
- https://www.w3.org/TR/wai-aria-1.1/
|
||||
- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA
|
||||
- http://a11yproject.com/
|
||||
- https://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
|
||||
|
||||
### Have you ever used a grid system, and if so, what do you prefer?
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,10 @@ An exception for positioning of `<script>`s at the bottom is when your script co
|
|||
|
||||
Keep in mind that putting scripts just before the closing `</body>` tag will create the illusion that the page loads faster on an empty cache (since the scripts won't block downloading the rest of the document). However, if you have some code you want to run during page load, it will only start executing after the entire page has loaded. If you put those scripts in the `<head>` tag, they would start executing before - so on a primed cache the page would actually appear to load faster.
|
||||
|
||||
**`<head>` and `<body>` tags are now optional**
|
||||
|
||||
As per the HTML5 specification, certain HTML tags like `<head>` and `<body>` are optional. Google's style guide even recommends removing them to save bytes. However, this practice is still not widely adopted and the performance gain is likely to be minimal and for most sites it's not likely going to matter.
|
||||
|
||||
###### References
|
||||
|
||||
- https://developer.yahoo.com/performance/rules.html#css_top
|
||||
|
|
|
|||
Loading…
Reference in New Issue