Ошибка: "Blocked aria-hidden on a
Есть следующий код кнопки на TS, при нажатии на которую открывается выпадающий список:
<button mat-button [matMenuTriggerFor]="menu" class="menu">
Кнопка
<mat-icon>arrow_drop_down</mat-icon>
</button>
Но при нажатии на элемент внутри выпадающего списка, появляется такая вот ошибка:
Blocked aria-hidden on a <button> element because the element that
just received focus must not be hidden from assistive technology
users. Avoid using aria-hidden on a focused element or its ancestor.
Consider using the inert attribute instead, which will also prevent
focus. For more details, see the aria-hidden section of the WAI-ARIA
specification at
P. S. В Интернете нашёл решение с заменой button
на div
, но не хотелось бы менять сам элемент, может можно как-нибудь по-другому?