-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(PPDSC-2403): Extend role and aria-haspopup on Popover #381
Merged
jannuk59
merged 22 commits into
main
from
feat/PPDSC-2403-extend-role-and-aria-haspopup-on-popover
Sep 28, 2022
Merged
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
17c9627
feat(PPDSC-2403): added role in props
ff0a16f
feat(PPDSC-2403): removed unused code
1003e87
feat(PPDSC-2403): disable the default aria-haspopup
59149ae
feat(PPDSC-2403): code cleanup
bb18f1f
feat(PPDSC-2403): code clean up
efe1e52
feat(PPDSC-2403): code cleanup
88b1de2
feat(PPDSC-2403): code cleanup
74597b5
feat(PPDSC-2403): renamed the props
cff1a1c
feat(PPDSC-2403): type refinement
1e513f9
feat(PPDSC-2403): removed duplicating the role
f95170f
feat(PPDSC-2403): code cleanup
518d767
feat(PPDSC-2403): linting fix
9a958cd
feat(PPDSC-2403): linting fix
1e8cff0
feat(PPDSC-2403): unit test case error fix
9627ac9
feat(PPDSC-2403): code patch fix
f7e473d
feat(PPDSC-2403): test case
779f761
feat(PPDSC-2403): simplified the condition
da16681
feat(PPDSC-2403): simplified the condition
061cc94
feat(PPDSC-2403): removed the commented codes
9e77e25
feat(PPDSC-2403): removed the commented codes
e179bf7
feat(PPDSC-2403): removed the commented codes
41877f2
feat(PPDSC-2403): removed the commented codes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ import {filterOutFalsyProperties} from '../utils/filter-object'; | |
const buildContextAriaAttributes: BuildAriaAttributesFn = ({ | ||
floating: {id, open}, | ||
}) => ({ | ||
'aria-haspopup': 'dialog', | ||
// 'aria-haspopup': 'dialog', | ||
'aria-controls': open ? id : undefined, | ||
}); | ||
|
||
|
@@ -40,6 +40,7 @@ const ThemelessPopover = React.forwardRef<HTMLDivElement, PopoverProps>( | |
header, | ||
closePosition = 'right', | ||
overrides = {}, | ||
role, | ||
handleCloseButtonClick, | ||
enableDismiss = false, | ||
disableFocusManagement = false, | ||
|
@@ -122,7 +123,7 @@ const ThemelessPopover = React.forwardRef<HTMLDivElement, PopoverProps>( | |
buildRefElAriaAttributes={buildContextAriaAttributes} | ||
buildFloatingElAriaAttributes={buildFloatingElementAriaAttributes} | ||
useInteractions={useInteractions} | ||
role="dialog" | ||
role={role} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
overrides={overrides} | ||
disableFocusManagement={disableFocusManagement} | ||
{...props} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
You don't have to remove that, this should stay as the default behaviour.
but we need to check if people provide they aria-haspopup and if so we don't apply it automatically.
For example:
That logic should happen in base-floating-element.tsx file, at the point you are cloning the children you can check if the children have already aria-popup