Search code examples
accessibilitywcag2.0

Is it WCAG Compatible to highlight a row for a quick moment?


so I tried looking through the documentation, but I don't seem to find a real answer for that. I've got a button which when clicked directs the user to a specific table row, whose background then is highlighted for like 3 seconds in a color. Question is: is that okay for WCGA? I mean its a time limited event and the user can't deactivate that, but is the change of a background for a few seconds counted as time limited event? And is it a problem that this only happens visually?


Solution

  • If the button is setting focus to that row as well, there should be no issue at all.

    For example, from Understanding Success Criterion 4.1.3: Status Messages

    make users aware of important changes in content that are not given focus

    As focus must be visible, users have all the time in the world to analyse the newly focussed row, so you will not fail Guideline 2.2: Enough Time.

    What becomes tricky in your case are the contrasts between the animated background colour and the focus indicator, which will need to be at least 3:1 as of WCAG 2.2.

    That is if you don’t use the focus style itself for the highlight (: