mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): Add interactive examples for CSS chapter review page (#65388)
This commit is contained in:
@@ -5,7 +5,7 @@ challengeType: 31
|
||||
dashedName: review-css
|
||||
---
|
||||
|
||||
# --description--
|
||||
# --interactive--
|
||||
|
||||
Review the concepts below to prepare for the upcoming exam.
|
||||
|
||||
@@ -432,11 +432,15 @@ In the above example, smooth scrolling is enabled if the user doesn't have anima
|
||||
- **`aria-hidden` attribute**: Used to hide an element from people using assistive technology such as screen readers. For example, this can be used to hide decorative images that do not provide any meaningful content.
|
||||
- **`hidden` attribute**: This attribute is supported by most modern browsers and hides content both visually and from the accessibility tree. It can be easily toggled with JavaScript.
|
||||
|
||||
:::interactive_editor
|
||||
|
||||
```html
|
||||
<p aria-hidden>This paragraph is visible for sighted users, but is hidden from assistive technology.</p>
|
||||
<p hidden>This paragraph is hidden from both sighted users and assistive technology.</p>
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## Accessibility Issue of the `placeholder` Attribute
|
||||
|
||||
Using placeholder text is not great for accessibility. Too often, users confuse the placeholder text with an actual input value - they think there is already a value in the input.
|
||||
|
||||
Reference in New Issue
Block a user