-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add alt for navigation logo, focusable props for dropdown and l…
…nks (#977) * feat: add default text for logo image Add "alt" field for LogoProps and set default value * feat: make navigation items more accessible Make navigation items focusable. Add "aria-expanded" for drop-down list. Change <span> to <button> because screen reader doesn't read it with <span>. Add additional CSS styles because <button> has default styles. * feat: add translation for Logo alt text * fix: change typization in NavigationDropdown component Change useRef type from HTMLElement to HTMLButtonElement. Change "type" value to "button" because "type" field from props conflicts with button "type" attribute. * feat: add alt field for NavigationLogoData interface
- Loading branch information
1 parent
3bb75d9
commit 40ba3d2
Showing
8 changed files
with
47 additions
and
6 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
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
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,3 @@ | ||
{ | ||
"image-alt": "Logo icon" | ||
} |
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 @@ | ||
import {addComponentKeysets} from '@gravity-ui/uikit/i18n'; | ||
|
||
import {NAMESPACE} from '../../../../utils/cn'; | ||
|
||
import en from './en.json'; | ||
import ru from './ru.json'; | ||
|
||
export const i18n = addComponentKeysets({en, ru}, `${NAMESPACE}Logo`); |
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,3 @@ | ||
{ | ||
"image-alt": "Иконка лого" | ||
} |
10 changes: 10 additions & 0 deletions
10
...avigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.scss
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
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
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