silverstripe-display-logic
silverstripe-display-logic copied to clipboard
Attributes removed from elements
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
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.
This PR might be relevant to this issue, would it solve your issue sufficiently? https://github.com/unclecheese/silverstripe-display-logic/pull/137
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 👍