Closed mikrotron closed 2 years ago
Latest commit: 0e67f72127aea0f1e60902ad59a0fcb7c148543c
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Purpose π
Fix an issue with the focus locking being too greedy in the
<Panel>
when it is wrapped in a web component.Notes βοΈ
The issue was reported and addressed in a recent update of the underlying
react-focus-lock
library used: https://github.com/theKashey/react-focus-lock/issues/188Updated the
<Overlay>
(used by the<Panel>
) as well as the<Modal>
and<Takeover>
.The update introduced a new bug however: the close button in the header would be excluded from the tab sequence if it was implemented as a
<Button.Close isSemantic={false}>
(ie<span role="button" tabindex="0">
). To compensate, the default value for theisSemantic
prop in the headers of all these components is nowtrue
(with anisCloseButtonSemantic
prop added to the<Panel.Header>
and<Modal.Header>
in case this needs to be reverted back tofalse
in some cases where global CSS causes painful conflicts.The
refHeading
prop for<Panel.Header>
was no longer being used and has now been removed. This was not flagged as amajor
version bump since that prop actually had no effect on anything.The "return focus" functionality of the
react-focus-lock
library does not seem to be working when the component is wrapped in a web component, so this behaviour will need to be applied manually in these cases, and has been included in the "Web Component" storybook example.Storybook π
http://storybooks.highbond-s3.com/paprika/RNG-372--fix-focus-lock/?path=/story/messaging-panel-backyard-sandbox--web-component-story
Screenshots πΈ
References π
https://aclgrc.atlassian.net/browse/RNG-372