For reference, WCAG’s success criterion (SC) 1.4.11 is the one describing this:
Understanding Success Criterion 1.4.11: Non-text Contrast | WAI | W3C
^^^ Lots of examples of interactive controls, todos and todon’t
The part about boundaries is especially relevant to our topic:
This success criterion does not require that controls have a visual boundary indicating the hit area, but if the visual indicator of the control is the only way to identify the control, then that indicator must have sufficient contrast. If text (or an icon) within a button or placeholder text inside a text input is visible and there is no visual indication of the hit area then the Success Criterion is passed. If a button with text also has a colored border, since the border does not provide the only indication there is no contrast requirement beyond the text contrast (1.4.3 Contrast (Minimum)). Note that for people with cognitive disabilities it is recommended to delineate the boundary of controls to aid in the recognition of controls and therefore the completion of activities.
In short, the border can be nice for usability/accessibility if the other contrast requirements in 1.4.3 are not met, but we should be alright without them (since AFAIK we fulfill them for button styles since this other topic).
So I don’t think it’d become an issue regarding WCAG.
A lot of WCAG Success Criterion address this problem and give some leeway for user generated content/parameters. For example in the SC 1.4.11:
User Interface Components: Visual information required to identify user interface components and states, except […] where the appearance of the component is determined by the user agent and not modified by the author;
From Web Content Accessibility Guidelines (WCAG) 2.1
It’d be a possible feature to limit color choices but I don’t think it should be activated by default since a user choosing a wrong color wouldn’t bring WCAG violation in XWiki. It would bring accessibility issues, but it’s not our responsibility by this point. The same way, nothing prevented a user from setting all the colors in the color theme to white, the wiki would become unusable, but it’s not our responsibility.
Considering we wouldn’t need to change any background/text color on buttons with the first solution, I agree .
Thanks for your proposal! It looks great