-
Notifications
You must be signed in to change notification settings - Fork 78
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(sidepanel): not to show tooltip when closed inline #3744
Conversation
There are some cypress flaky tests failed. This is should be fixed in another PR in |
✅ Deploy Preview for carbon-addons-iot-react ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good for the title component but we have to make sure none of the content is able to to be tabbed to when closed. I thought we had an issue for this but I am not able to find one.
For the buttons that we control we can add the useEffect(() => {
const focusItems = document.querySelector(`.${baseClass}__action-bar').querySelectorAll('button, a[href], input, textarea, select, details,[tabindex]:not([tabindex="-1"]`);
const focusItems2 = document.querySelector(`.${baseClass}__content').querySelectorAll('button, a[href], input, textarea, select, details,[tabindex]:not([tabindex="-1"]`);
if (isOpen) {
[...focusItems, ...focusItems2].filter(el => !el.hasAttribute('disabled')).forEach(e => {
e.setAttribute('tabindex', -1);
})
} else {
[...focusItems, ...focusItems2].filter(el => !el.hasAttribute('disabled')).forEach(e => {
e.setAttribute('tabindex', -1);
})
}
}, [isOpen]); I would also add |
LGTM 👍 |
Closes #3695
Summary
Change List (commits, features, bugs, etc)
tabIndex
andaria-hidden
Acceptance Test (how to verify the PR)
inline
Regression Test (how to make sure this PR doesn't break old functionality)
Things to look for during review
iot
orbx
class prefix is using the prefix variabledata-testid
attribute. New test ids should have test written to ensure they are not changed or removed.