Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: remove aria-hidden from listbox focusable content #17466

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions packages/primeng/src/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,7 @@ export const LISTBOX_VALUE_ACCESSOR: any = {
imports: [CommonModule, Ripple, Scroller, InputIcon, SearchIcon, Checkbox, CheckIcon, IconField, InputText, BlankIcon, FormsModule, SharedModule],
template: `
<div [attr.id]="id" [ngClass]="containerClass" [ngStyle]="style" [class]="styleClass" (focusout)="onFocusout($event)">
<span
#firstHiddenFocusableElement
role="presentation"
[attr.aria-hidden]="true"
class="p-hidden-accessible p-hidden-focusable"
[tabindex]="!disabled ? tabindex : -1"
(focus)="onFirstHiddenFocus($event)"
[attr.data-p-hidden-focusable]="true"
>
</span>
<span #firstHiddenFocusableElement role="presentation" class="p-hidden-accessible p-hidden-focusable" [tabindex]="!disabled ? tabindex : -1" (focus)="onFirstHiddenFocus($event)" [attr.data-p-hidden-focusable]="true"> </span>
<div class="p-listbox-header" *ngIf="headerFacet || headerTemplate || _headerTemplate">
<ng-content select="p-header"></ng-content>
<ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate; context: { $implicit: modelValue(), options: visibleOptions() }"></ng-container>
Expand Down Expand Up @@ -262,16 +253,7 @@ export const LISTBOX_VALUE_ACCESSOR: any = {
<span role="status" aria-live="polite" class="p-hidden-accessible">
{{ selectedMessageText }}
</span>
<span
#lastHiddenFocusableElement
role="presentation"
[attr.aria-hidden]="true"
class="p-hidden-accessible p-hidden-focusable"
[tabindex]="!disabled ? tabindex : -1"
(focus)="onLastHiddenFocus($event)"
[attr.data-p-hidden-focusable]="true"
>
</span>
<span #lastHiddenFocusableElement role="presentation" class="p-hidden-accessible p-hidden-focusable" [tabindex]="!disabled ? tabindex : -1" (focus)="onLastHiddenFocus($event)" [attr.data-p-hidden-focusable]="true"> </span>
</div>
`,
providers: [LISTBOX_VALUE_ACCESSOR, ListBoxStyle],
Expand Down
Loading