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

fix(material/list): fix text trim #29758

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DBowen33
Copy link
Contributor

@DBowen33 DBowen33 commented Sep 18, 2024

fix text trim issue where visual users won't be able to see full text if list item text is overflowed in container and ellipsis is shown.

fixes b/291296866

After: https://screencast.googleplex.com/cast/NDc3NDY5OTE0OTAzMzQ3Mnw3MjJlZjA2ZS05MQ
NOTE: cursor is slightly off from text container in video for some reason

fix text trim issue where visual users won't be able to see if list item text
is overflowed in container

fixes b/291296866
update api golden

fixes b/291296866
update api golden

fixes b/291296866
make func private

fixes b/291296866
@DBowen33 DBowen33 marked this pull request as ready for review September 18, 2024 23:47
@DBowen33 DBowen33 requested a review from a team as a code owner September 18, 2024 23:47
@DBowen33 DBowen33 requested review from crisbeto and andrewseguin and removed request for a team September 18, 2024 23:47
@jelbourn jelbourn added the dev-app preview When applied, previews of the dev-app are deployed to Firebase label Sep 19, 2024
Copy link

Deployed dev-app for 87c41f6 to: https://ng-dev-previews-comp--pr-angular-components-29758-dev-yuh6xxfu.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.


// In case text overflow is triggered and ellipsis is applied, adds role='tooltip' and title
// attribute to container so visual users can see the full text on hover
private _addTitleToTruncatedText() {
Copy link
Member

Choose a reason for hiding this comment

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

This won't work if the text changes and I don't think that we would want to poll the DOM for it. Given that users project the MatListItemLine themselves, it might be better to just update our a11y guidelines to mention adding role="tooltip" for longer text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-app preview When applied, previews of the dev-app are deployed to Firebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants