Skip to main content
Participant
Apr 7, 2017 3:39 PM UTC
Answered

Adding Visual Focus to Buttons in Captivate

Hi,

For accessibility purposes, I'm trying to figure out if it is possible to add visual focus to buttons and other elements in Captivate. What I mean by this is adding some sort of visual indicator around a button when you tab between them, so people who are using a keyboard know which button currently has focus. I can't figure out a way to do this, does anyone have an ideas?

Thanks

    This topic is closed to new replies. Start a new post to keep the conversation going.
    mferguson192291Correct answer
    Inspiring
    Apr 26, 2017 6:22 PM UTC

    When you publish your Captivate course, Go into Assets folder -> CSS folder -> and open CPLibraryAll in Notepad. Copy and paste the following lines into your published course output.

    *:focus {outline: #FF0033 solid 3px;

    }

    .cp-frameset:focus {

    opacity: 1 !important;

    background-color: transparent !important;

    }

    Then save. Now you have a very visible keyboard focus indicator for your course. You can change the Color Code and Size at your leisure by changing the color code above, etc.

    12 replies

    klospieli
    Known Participant
    Nov 15, 2019 6:06 PM UTC

    I'm having the same issue asgarofano mentions. Any help would be appreciated!

    Translate
    Participant
    Nov 26, 2020 2:03 PM UTC

    Captivate adds a number of inline css styles to buttons, including this one:

    style="outline-style: none;"

     Because it's inline, it takes precedence over the outline-style rule you add into Assets/CSS/CPLibraryAll.css

    If you amend the rule to this it should work:

    *:focus {
        outline: 3px red solid !important;
    }

     If you want to target elements further to only highlight buttons, replace the * with [role=button]:

    [role=button]:focus {
        outline: 3px red solid !important;
    }

     

    Translate
    mferguson192291Correct answer
    Inspiring
    Apr 26, 2017 6:22 PM UTC

    When you publish your Captivate course, Go into Assets folder -> CSS folder -> and open CPLibraryAll in Notepad. Copy and paste the following lines into your published course output.

    *:focus {outline: #FF0033 solid 3px;

    }

    .cp-frameset:focus {

    opacity: 1 !important;

    background-color: transparent !important;

    }

    Then save. Now you have a very visible keyboard focus indicator for your course. You can change the Color Code and Size at your leisure by changing the color code above, etc.

    Translate
    Participant
    Apr 27, 2017 8:05 PM UTC

    Wow, that worked great. Thanks so much!

    Translate
    Paul Wilson CTDP
    Community Expert
    Community Expert
    Apr 7, 2017 11:01 PM UTC

    It is there but it's only one pixel wide and could easily be missed, especially if the person who uses only a keyboard also has a visual impairment. you might want to suggest this as a feature enhancement. Perhaps tabbing could activate the rollover effect on multi-state buttons. If you would like to suggest it as a feature click the link below...

    http://www.adobe.com/products/wishform.html

    Translate
    Paul Wilson, CTDP
    klospieli
    Known Participant
    Nov 15, 2019 6:26 PM UTC

    Paul... i follow you on youtube. (thank you for all your help!) Any idea how to make focus indicators work on the buttons on the page and not just on the playbar? (see bottom 2 replies on this thread)

    Translate