Can I use aria-label attribute in TelerikWindow?

1 Answer 164 Views
Accessibility Window
Alexandre
Top achievements
Rank 1
Iron
Iron
Alexandre asked on 01 Mar 2023, 09:21 PM | edited on 01 Mar 2023, 09:23 PM

I need aria-label (for accessibility) but when I add it to TelerikWindow:

<TelerikWindow @ref="myWindow" Header="My Window" Width="300" Height="200" aria-label="My Custom Label">

but getting the following error:

System.InvalidOperationException: Object of type 'Telerik.Blazor.Components.TelerikWindow' does not have a property matching the name 'aria-label'.

The same if I try to add AdditionalAttributes

<TelerikWindow @ref="myWindow" Header="My Window" Width="300" Height="200" AdditionalAttributes="@windowAttributes">
    <Content>
        <div class="window-content">
            <p>This is my window content.</p>
        </div>
    </Content>
</TelerikWindow>

@code {
    private Dictionary<string, object> windowAttributes = new Dictionary<string, object> { { "aria-label", "My Custom Label" } };
    private TelerikWindow myWindow;
}

How I can add aria-label to TelerikWindow?

1 Answer, 1 is accepted

Sort by
1
Svetoslav Dimitrov
Telerik team
answered on 06 Mar 2023, 11:24 AM

Hello Alexandre,

I have opened a new feature request on your behalf - Add the AriaLabelledBy and AriaDescribedBy parameters. I have added your Vote for it and you are automatically subscribed to receive email notifications on status updates.

On the topic of the aria-label - according to the MDN web docs, the aria-label is not supported for role="dialog". 

Regards,
Svetoslav Dimitrov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Alexandre
Top achievements
Rank 1
Iron
Iron
commented on 06 Mar 2023, 04:19 PM | edited

Thank you!

Can we also have attribute aria-modal="true" and  attribute role=dialog?

Svetoslav Dimitrov
Telerik team
commented on 09 Mar 2023, 07:24 AM

Hello Alexandre,

We already add the aria-modal="true/false", and the role="attribute". When the Modal parameter of the TelerikWindow is set to true the aria-modal becomes true, as well, else it remains false. The role attribute is always set to dialog no matter the value of the Modal parameter.

These attributes already comply with the accessibility standards

That being said, do you believe you still believe you need to modify them?

Alexandre
Top achievements
Rank 1
Iron
Iron
commented on 09 Mar 2023, 02:40 PM | edited

ok, I see them now
Tags
Accessibility Window
Asked by
Alexandre
Top achievements
Rank 1
Iron
Iron
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or