-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Добавляет демку для
aria-keyshortcuts
(#4758)
- Loading branch information
1 parent
d5f5314
commit 7cbe926
Showing
2 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
78 changes: 78 additions & 0 deletions
78
a11y/aria-keyshortcuts/demos/button-with-shortcut/index.html
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,78 @@ | ||
<!DOCTYPE html> | ||
<html lang="ru"> | ||
<head> | ||
<title>Клавиатурное сокращение для кнопки — aria-keyshortcuts — Дока</title> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"> | ||
<style> | ||
*, *::before, *::after { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
html { | ||
color-scheme: dark; | ||
font-size: 18px; | ||
} | ||
|
||
body { | ||
min-height: 100vh; | ||
padding: 50px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: #18191C; | ||
color: #FFFFFF; | ||
font-family: "Roboto", sans-serif; | ||
} | ||
|
||
.button { | ||
display: block; | ||
min-width: 210px; | ||
border: 2px solid transparent; | ||
border-radius: 6px; | ||
padding: 9px 15px; | ||
color: #000000; | ||
font-size: 1rem; | ||
font-weight: 300; | ||
font-family: inherit; | ||
transition: background-color 0.2s linear; | ||
} | ||
|
||
.button:hover { | ||
background-color: #FFFFFF; | ||
cursor: pointer; | ||
transition: background-color 0.2s linear; | ||
} | ||
|
||
.button:focus-visible { | ||
border: 2px solid #FFFFFF; | ||
outline: none; | ||
} | ||
|
||
.button:focus { | ||
border: 2px solid #FFFFFF; | ||
outline: none; | ||
} | ||
|
||
.button-aqua { | ||
background-color: #10F3AF; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
body { | ||
padding: 30px; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<button class="button button-aqua" aria-keyshortcuts="Shift+F"> | ||
Развернуть | ||
</button> | ||
</body> | ||
</html> |
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