Skip to content

Commit

Permalink
Добавляет плейсхолдер superscript (#4613)
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaFokina authored Jul 31, 2023
1 parent 3a9b95d commit 88b2f91
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions a11y/role-superscript/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "`superscript`"
description: "Роль для надстрочного текста."
authors:
- doka-dog
related:
- a11y/aria-roles
- html/sub
- html/sup
tags:
- doka
- placeholder
---

## Кратко

[Роль структуры документа](/a11y/aria-roles/#roli-struktury-dokumenta) из [WAI-ARIA](/a11y/aria-intro/#specifikaciya) для надстрочного текста. Например, как в математических формулах.

Роль `superscript` есть у [`<sup>`](/html/sup/) по умолчанию.

## Как пишется

Задайте тегу `role="superscript"`. Для этого больше всего подходит [`<span>`](/html/span/). В большинстве случаев лучше использовать тег `<sup>`.

Элементам с ролью `superscript` можно задавать все [глобальные ARIA-атрибуты](/a11y/aria-attrs/#globalnye-atributy), кроме [`aria-label`](/a11y/aria-label/) и [`aria-labelledby`](/a11y/aria-labelledby/).

0 comments on commit 88b2f91

Please sign in to comment.