feat(modals): changed StyledTooltipDialog's width from 400px to min(90vw, 400px) #2055
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.
Description
During a recent Zendesk Help Center accessibility audit, it was revealed that the Permalink Tooltip Dialog doesn't shrink to fit within smaller viewports. This is a violation of WCAG 2.2 SC 1.4.10, Reflow, since it forces users to scroll both horizontally and vertically to engage with the Tooltip Dialog's content:
The CSS change in this PR could tide us over until greater time and consideration can be given to the Tooltip Dialog's responsive design.
Detail
Before
StyledTooltipDialogcomponent has a fixed width of 400px. Its content gets cut off on small viewports.After
StyledTooltipDialogcomponent has a dynamic width, determined by the CSS min() function. The component will be 400px wide until the computed value of 90vw is less than 400px. This will allows content to be better accommodated within narrow viewports.Checklist
npm start)?bedrock)