-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Accessibility in accordion panel #537
Conversation
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.
Thanks @brichet
I guess you use the Renderer
to reuse the uuid
. But could you please prefer not changing any public API and add the id
if it does not exist in AccordionLayout.insertWidget
- inherited from https://github.com/jupyterlab/lumino/blob/main/packages/widgets/src/panellayout.ts#L87
Thanks for review @fcollonval |
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.
Thanks @brichet for the changes.
Could you add assertions to the tests and run yarn run api
to update the API files (the associated CI job is failing).
let w2 = new Widget(); | ||
|
||
// Expects a widget ID to be created. | ||
expect(!w1.id); |
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.
I think you cannot just call expect
, you need to add an assertion like
expect(w1.id).to.be.undefined;
For test equality, you should use expect(a).to.equal('value');
You can look at the chai library to see what is available.
Could you fix the test at line 123 that probably misguided you as it was missing an assertion.
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.
I wanted to make sure the tests pass 😄
Thanks for noticing.
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.
Thanks @brichet
This PR fixes an accessibility issue about accordion panel:
tab
to the title, which is not in atablist
element.aria-controls
attribute of the corresponding title.