forked from doka-guide/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Добавляет ответ на вопрос Опишите методы, с помощью которых можно скр…
…ыть контент (doka-guide#5643) * добавляет ответ на вопрос * Форматирует, расставляет ссылки * е → ё --------- Co-authored-by: Tatiana Fokina <[email protected]>
- Loading branch information
1 parent
fbe1142
commit 049c1f2
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**Скрыть контент от всех пользователей**. Если элемент должен быть полностью невидим и недоступен, есть несколько способов: | ||
|
||
- **`[display: none](/css/display/)`** — полностью удаляет элемент из документа. Элемент не занимает места, хотя всё ещё находится в исходном HTML-коде. | ||
- **`[visibility: hidden](/css/visibility/)`** — элемент остаётся в потоке документа (занимает пространство), но не виден и недоступен. | ||
- **HTML-атрибут `[hidden](/html/hidden/)`** — работает как `display: none`, но добавляет семантическое значение «этот элемент скрыт». | ||
|
||
**Скрыть контент только от скринридеров**. Иногда элемент на странице не нужен пользователям [скринридеров](/a11y/screenreaders/). Например, декоративная иконка, разделитель или иллюстрация, которая не несёт смысловой нагрузки. В таких случаях применяется атрибут **`[aria-hidden="true"](/a11y/aria-hidden/)`**, который исключает содержимое элемента из области видимости скринридеров. | ||
|
||
**Скрыть контент только от зрячих пользователей**. Если нужно, чтобы элемент был доступен только для скринридеров, применяют специальные CSS-классы вроде `.visually-hidden`, `.vh` или `.sr-only`. Они делают элемент невидимым на экране, но сохраняют его доступным для озвучивания. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
name: 'Елена Догман' | ||
url: https://github.com/elena-dogman | ||
photo: photo.jpg | ||
photoAlt: 'Это я с безнадёжно заваленным горизонтом, сижу' | ||
badges: | ||
- first-contribution-small | ||
--- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.