Skip to content
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

feat(ui-breadcrumb,ui-tooltip): add tooltips for truncated breadcrumbs #1792

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HerrTopi
Copy link
Contributor

Closes: INSTUI-4371

Copy link

github-actions bot commented Nov 26, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://instructure.github.io/instructure-ui/pr-preview/pr-1792/
on branch gh-pages at 2024-11-26 21:01 UTC

@HerrTopi HerrTopi force-pushed the INSTUI-4371-breadcrumb-tooltip branch from 8089b9c to f88ed28 Compare November 26, 2024 20:55
Copy link
Collaborator

@matyasf matyasf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comments. Sadly NVDA behaves very differently from VoiceOver

* If true, it won't display the tooltip. This is useful in cases when tooltip is conditionally needed
* but in an uncontrolled way
*/
preventTooltip?: boolean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please write a test for this?

<TruncateText
onUpdate={(isTruncated) => this.handleTruncation(isTruncated)}
>
<span aria-hidden={isTruncated}>{children}</span>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saddly this is no good, NVDA ignores nodes that do not have text content or are set to aria-hidden. So here is just read 'button'

isWithinText={false}
elementRef={this.handleRef}
>
<TruncateText
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldnt it be easier just to use here native text truncation?

@joyenjoyer
Copy link
Contributor

Let me know if you finish going through the requested changes and I will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants