Skip to content

Commit

Permalink
Fix: Removed the unnecessary aria-checked attribute and improved acce…
Browse files Browse the repository at this point in the history
…ssibility by allowing the click event to be processed correctly without being blocked. (#16554)
  • Loading branch information
Sergiorezende22 authored Nov 18, 2024
1 parent 2a29786 commit b939b29
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/components/radiobutton/radiobutton.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Injectable, Injector, Input, NgModule, OnDestroy, OnInit, Output, ViewChild, booleanAttribute, forwardRef, numberAttribute } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
import { Nullable } from 'primeng/ts-helpers';
import { AutoFocusModule } from 'primeng/autofocus';
import { Nullable } from 'primeng/ts-helpers';

import { RadioButtonClickEvent } from './radiobutton.interface';
import { PrimeNGConfig } from 'primeng/api';
import { RadioButtonClickEvent } from './radiobutton.interface';

export const RADIO_VALUE_ACCESSOR: any = {
provide: NG_VALUE_ACCESSOR,
Expand Down Expand Up @@ -78,7 +78,6 @@ export class RadioControlRegistry {
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.tabindex]="tabindex"
[attr.aria-checked]="checked"
(focus)="onInputFocus($event)"
(blur)="onInputBlur($event)"
[attr.data-pc-section]="'hiddenInput'"
Expand Down Expand Up @@ -222,8 +221,6 @@ export class RadioButton implements ControlValueAccessor, OnInit, OnDestroy {
}

handleClick(event: Event, radioButton: HTMLElement, focus: boolean) {
event.preventDefault();

if (this.disabled) {
return;
}
Expand Down

0 comments on commit b939b29

Please sign in to comment.