scripting / feedlandBlogrollToolkit

Browser-based JavaScript code, html and styles for adding an OPML-based blogroll to a website, with a connection back to FeedLand for realtime updates.
MIT License
3 stars 0 forks source link

Keyboard interactions #2

Closed NickGreen closed 5 months ago

NickGreen commented 5 months ago

Keyboard interactions aren't currently working as expected on https://feedland.blog/blogroll-wp-plugin-test/

Expected behavior

When the Blogroll div is in focus, we should be able to click up and down with the keyboard to navigate, and press enter to open each line.

Observed behavior

The keyboard interactions aren't navigating within the #BlogrollContainer div.

Details

Solution

Change this:

function feedland_blogroll_shortcode(): string {
    return '<div id="divBlogrollContainer"></div><script>$=jQuery;blogroll(BLOGROLL_OPTIONS);</script>';
}

to this:

function feedland_blogroll_shortcode(): string {
    return '<div id="divBlogrollContainer" tabindex="0"></div><script>$=jQuery;blogroll(BLOGROLL_OPTIONS);</script>';
}
scripting commented 5 months ago

Good report.

I didn't write explicit instructions, I probably should, but the example code does have the tabindex attribute.

<div class="divBlogrollContainer" id="idBlogrollContainer" tabindex="0">
        </div>
NickGreen commented 5 months ago

Perfect. Looks like that was missed. We've got that added now, so closing this out.