ant-design-blazor/components/icon/Icon.razor
Peter Ha c559bd321e
feat(module: icon): icon role attribute change now assignable, does not change default behavior (#3370)
when a screen reader parses an icon, it sees the role attribute has a value of 'img'. in the case where we don't want the screen reader to read the icon, the role can be assigned a blank value and the role attribute will not be added. instead, the aria-hidden attribute will be added with a value of 'true'

no breaking changes
2023-07-25 23:30:30 +08:00

14 lines
333 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<span class="@ClassMapper.Class" style="@Style" id="@Id" tabindex="@TabIndex" @ref="Ref" @attributes="_attributes" @onclick:stopPropagation="StopPropagation">
@if (Component == null)
{
@((MarkupString) _svgImg)
}
else
{
@Component
}
</span>