angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.32k stars 6.72k forks source link

bug(AngularMaterial/BUTTON): Correct HTML Syntax #20392

Closed forsti0506 closed 4 years ago

forsti0506 commented 4 years ago

Reproduction

Steps to reproduce:

  1. Go to HTML-Code of Material Button: https://github.com/angular/components/blob/master/src/material/button/button.html
  2. There you see the syntax of a material Button which leads to div tags inside a button tag which is not a valid html structure.

Fix

Replace the 2 divs with a span for valid html <span class="mat-button-wrapper"><ng-content></ng-content></span> <span matRipple class="mat-button-ripple" [class.mat-button-ripple-round]="isRoundButton || isIconButton" [matRippleDisabled]="_isRippleDisabled()" [matRippleCentered]="isIconButton" [matRippleTrigger]="_getHostElement()"></span> <span class="mat-button-focus-overlay"></span>

crisbeto commented 4 years ago

There are a couple of in-progress PRs that will resolve this: https://github.com/angular/components/pull/20376 and https://github.com/angular/components/pull/20390.

angular-automatic-lock-bot[bot] commented 3 years ago

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.