silverstripe-display-logic icon indicating copy to clipboard operation
silverstripe-display-logic copied to clipboard

Attributes removed from elements

Open ramono opened this issue 4 years ago • 3 comments

Recently I've submitted a PR to silverstripe/framework to add a missing attribute needed for accessibility: https://github.com/silverstripe/silverstripe-framework/pull/9427

But today using it in another project I've realized that the new attribute is not being added, because this module is overwriting certain templates.

Moreover, on CheckboxSetField.ss the $AttributesHTML variable is removed in favor of hardcoded individual attributes, is this really necessary?

Would it be possible to leave the $AttributesHTML variable and add the conditional after, so any extra attributes added to the field don't get lost? (Specifically asking if the name attribute is needed when display logic is used, or if it can be changed to a different data attribute instead).

Besides that, I'd like to add the role="option" to the list elements so it appears as per my PR

Thanks

ramono avatar Mar 19 '20 21:03 ramono

Hello! Thank you for raising the issue and apologies it hasn't been responded to earlier.

We can look into the custom attributes vs the $AttributesHTML variable. If your issue is with the missing role attribute, if you opened a PR adding just that I'd be happy to review it.

michalkleiner avatar Feb 15 '23 02:02 michalkleiner

This PR might be relevant to this issue, would it solve your issue sufficiently? https://github.com/unclecheese/silverstripe-display-logic/pull/137

michalkleiner avatar Feb 15 '23 03:02 michalkleiner

Hi, thanks for checking into it, it looks like the #137 solves the problem, happy for this issue to be closed once that is merged 👍

ramono avatar Feb 15 '23 04:02 ramono