dimanche 18 avril 2021

How to make button appearance independent of ARIA-PRESSED in razor/cshtml?

Why is button appearance depends on ARIA-PRESSED, how to make a button appearance independent of ARIA-PRESSED? Here is my button declaration. The below code doesn't have ARIA-PRESSED hence it doesn't show as selected, when I include ARIA-PRESSED it works fine.

                   <button class="c-select-button @classProperty"
                    role="option"
                    data-key="@Model.GroupId"
                    alt-text="@option.AltText"
                    aria-checked="@selected"
                    aria-selected="@selected"
                    data-selected-aria-label="@option.SelectedAriaLabel"
                    aria-label="@ariaLabel"
                    @Html.RenderAttribute("data-sid", @option.SkuId, false)
                    @Html.RenderAttribute("data-prdname", @option.Name, false)
                    data-select-button-swatch="@option.ColorValue"
                    data-value="@option.Value">
                <span class="glyph-check-mark"></span> //This depends on ARIA-PRESSED, if its true then it applies else not.
            </button>



Aucun commentaire:

Enregistrer un commentaire