File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 15
15
[id] ="inputId "
16
16
[checked] ="checked "
17
17
[disabled] ="disabled "
18
- [name] ="name "
18
+ [attr. name] ="name "
19
19
[required] ="required "
20
20
[attr.aria-label] ="ariaLabel "
21
21
[attr.aria-labelledby] ="ariaLabelledby "
Original file line number Diff line number Diff line change @@ -638,6 +638,12 @@ describe('MatRadio', () => {
638
638
expect ( document . activeElement ) . toBe ( fruitRadioNativeInputs [ i ] ) ;
639
639
}
640
640
} ) ;
641
+
642
+ it ( 'should not add the "name" attribute if it is not passed in' , ( ) => {
643
+ const radio = fixture . debugElement . nativeElement . querySelector ( '#nameless input' ) ;
644
+ expect ( radio . hasAttribute ( 'name' ) ) . toBe ( false ) ;
645
+ } ) ;
646
+
641
647
} ) ;
642
648
643
649
describe ( 'with tabindex' , ( ) => {
@@ -711,6 +717,7 @@ class RadiosInsideRadioGroup {
711
717
[aria-labelledby]="ariaLabelledby">
712
718
</mat-radio-button>
713
719
<mat-radio-button name="fruit" value="raspberry">Raspberry</mat-radio-button>
720
+ <mat-radio-button id="nameless" value="no-name">No name</mat-radio-button>
714
721
`
715
722
} )
716
723
class StandaloneRadioButtons {
You can’t perform that action at this time.
0 commit comments