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
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.
Problem
There is some inconsistency with how the description is truncated for APIs and Products.
Solution
Seems that
truncateLastWord
fromhtml-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![image](https://github.com/Azure/api-management-developer-portal/assets/92857141/46e14a98-f2b7-43c6-8718-8241c2e39800)
truncateLastWord: false
): 17 characters, even if we set it to 250 in the bindingafter: 250 characters (as set in the binding)![image](https://github.com/Azure/api-management-developer-portal/assets/92857141/1009d332-41d4-44ec-9636-fbf85ed54ea5)
Closes #2260 , #2259