Skip to content
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: add method to customize Dialog overlay ARIA role #6473

Merged
merged 7 commits into from
Jul 30, 2024

Conversation

web-padawan
Copy link
Member

Description

Part of vaadin/web-components#4977

Depends on vaadin/web-components#7582

Added setOverlayRole() and getOverlayRole() methods to Dialog (the logic is copied from the Popover).

Type of change

  • Feature

@web-padawan web-padawan requested a review from vursen July 29, 2024 08:08
Copy link

sonarcloud bot commented Jul 30, 2024

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha7 and is also targeting the upcoming stable 24.5.0 version.

* @param role
* the role to set
*/
public void setOverlayRole(String role) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this should be an enum on the flow side with both possible values (dialog / alertdialog) to ensure the typical type safety on java side.. those values don't change often and people could theoretically always use the element API if a new value comes out of the blue and you could not update in time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Maybe we could add an override for this method to Dialog and also Popover.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That you have to decide :) While in alpha.. I would just ditch the old methods completely before you have to maintain them for decades

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are about to release beta so I'm afraid for now we'd have to leave these methods as they are.
Created #6645 so that we don't forget about this idea, and maybe consider it for the next minor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants