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

Fixed heavily truncated description for APIs and Products #2386

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

malincrist
Copy link
Member

Problem

There is some inconsistency with how the description is truncated for APIs and Products.

Solution

Seems that truncateLastWord from html-truncate doesn't work as expected and is miscalculating where the truncation should happen. This attribute is also marked as deprecated from version 1.0.0, so we can remove it and allow the last word to be truncated.

For the same text:

  • before (with truncateLastWord: false): 17 characters, even if we set it to 250 in the binding
    image

  • after: 250 characters (as set in the binding)
    image

Closes #2260 , #2259

Copy link

Accessibility Insights Accessibility Insights Action: All applicable checks passed

  • URLs: 13 URL(s) passed, and 0 were not scannable
  • Rules: 29 check(s) passed, and 23 were not applicable
  • Download the Accessibility Insights artifact to view the detailed results of these checks

This scan used axe-core 4.3.2 with Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36.

@malincrist malincrist merged commit 0e1a8ea into master Jan 30, 2024
10 checks passed
@malincrist malincrist deleted the malincrist/bug/description-heavily-truncated branch January 30, 2024 12:55
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.

API Gallery - heavily truncated API description
2 participants