-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip labeling #3094
Merged
Merged
Tooltip labeling #3094
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
dafef75
feat: Better labeling of Tooltip
KenAJoh d0909f9
feat: Better keyshortcuts for screenreaders in Tooltip
KenAJoh 35611f0
memo: Updated story
KenAJoh d5e2a94
memo: changeset
KenAJoh 7f42652
bug: Better error logging for example-parsing
KenAJoh 80f3bf5
refactor: describeChild -> describesChild
KenAJoh 3eee6c0
fire: Removed extra story
KenAJoh 58517af
bug: removed extra tabIndex
KenAJoh 1cd5d33
memo: Update Tooltip demo description
KenAJoh 685df00
Merge branch 'main' into tooltip-describeChild
KenAJoh 2330ac6
Update aksel.nav.no/website/pages/eksempler/tooltip/labeling.tsx
KenAJoh 7baefae
refactor: Updated defaultValue for describesChild
KenAJoh 0af9963
Merge branch 'tooltip-describeChild' of https://github.com/navikt/aks…
KenAJoh 84bddbc
Merge branch 'main' into tooltip-describeChild
KenAJoh a76af99
bug: removed Tooltip prop from ToggleGroup
KenAJoh 8f7d4d5
memo: Updated changeset
KenAJoh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,5 @@ | ||
--- | ||
"@navikt/ds-react": minor | ||
--- | ||
|
||
Tooltip: New prop 'desribeChild' to better handle elements with no visible labels. |
HalvorHaugan marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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,29 @@ | ||
import { PrinterLargeIcon } from "@navikt/aksel-icons"; | ||
import { Button, HStack, Tooltip } from "@navikt/ds-react"; | ||
import { withDsExample } from "@/web/examples/withDsExample"; | ||
|
||
const Example = () => { | ||
return ( | ||
<HStack gap="4"> | ||
<Tooltip content="Skriv ut dokument"> | ||
<Button icon={<PrinterLargeIcon aria-hidden />} /> | ||
</Tooltip> | ||
<Tooltip content="Skriv ut dokument" describesChild> | ||
<Button>Skriv ut</Button> | ||
</Tooltip> | ||
</HStack> | ||
); | ||
}; | ||
|
||
// EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE | ||
export default withDsExample(Example); | ||
|
||
/* Storybook story */ | ||
export const Demo = { | ||
render: Example, | ||
}; | ||
|
||
export const args = { | ||
index: 4, | ||
desc: "Hvis tooltip ikke er eneste form for tekstlig beskrivelse, kan du sette 'describesChild' til 'true'. Tooltip content blir da satt som 'title' (lukket) og 'aria-describedby' (åpen).", | ||
}; |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major?
Text should be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Updated to major and added a TODO. Will write a section for v7 here https://aksel.nav.no/grunnleggende/kode/migrering.
For now i will create a feature-branch we can merge v7 changes into and change the base of this branch to that one.