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

bug(CalendarComponent): div not allowed as child element of button #26825

Closed
1 task
Inera23 opened this issue Mar 23, 2023 · 1 comment · Fixed by #26838
Closed
1 task

bug(CalendarComponent): div not allowed as child element of button #26825

Inera23 opened this issue Mar 23, 2023 · 1 comment · Fixed by #26838
Assignees
Labels
area: material/datepicker P4 A relatively minor issue that is not relevant to core functions

Comments

@Inera23
Copy link

Inera23 commented Mar 23, 2023

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Skärmavbild 2023-03-23 kl  13 30 18

The calendar element has a div element as a child of button element. which is break the html validation rules.

Block elements are not allowed inside inline elements. In this case, the button and img tags are inline elements while div, h3 and p tags are block elements. So, it's still invalid.

Reproduction

Steps to reproduce:
1.
2.

Expected Behavior

Calendar element should not has a div element inside a button element.

Actual Behavior

Calendar element has a div element inside a button element.

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):
@Inera23 Inera23 added the needs triage This issue needs to be triaged by the team label Mar 23, 2023
@Inera23 Inera23 changed the title bug(COMPONENT): div not allowed as child element of button bug(CalendarComponent): div not allowed as child element of button Mar 23, 2023
@zarend zarend added P4 A relatively minor issue that is not relevant to core functions area: material/datepicker and removed needs triage This issue needs to be triaged by the team labels Mar 23, 2023
crisbeto added a commit to crisbeto/material2 that referenced this issue Mar 26, 2023
Fixes that we had divs as children of buttons which some a11y tools complain about.

Fixes angular#26825.
@crisbeto crisbeto self-assigned this Mar 26, 2023
crisbeto added a commit that referenced this issue Mar 27, 2023
Fixes that we had divs as children of buttons which some a11y tools complain about.

Fixes #26825.
crisbeto added a commit that referenced this issue Mar 27, 2023
Fixes that we had divs as children of buttons which some a11y tools complain about.

Fixes #26825.

(cherry picked from commit e6f1a7d)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 27, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/datepicker P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants