From 7d635f32e4891577f5d71bb6a9fcd98d84f702b8 Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Tue, 22 Dec 2020 13:09:35 -0800 Subject: [PATCH] Button IDL example: Add Open in codepen button (pull #1681) * Add codepen to button idl * Fix button-idl test Co-authored-by: Matt King --- examples/button/button_idl.html | 39 ++++++++++++++++++++++++++++---- examples/button/js/button_idl.js | 4 ++-- test/tests/button_button-idl.js | 2 +- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/examples/button/button_idl.html b/examples/button/button_idl.html index 309da1e79..056e96385 100644 --- a/examples/button/button_idl.html +++ b/examples/button/button_idl.html @@ -38,7 +38,9 @@

Button Examples (IDL Version)

-

Example

+
+

Example

+

IMPORTANT: This example uses features of the draft ARIA 1.2 specification. As a draft specification, it is subject to change. Support provided by browsers or assistive technologies is experimental. @@ -53,9 +55,38 @@

Example

Mute + + @@ -163,7 +194,7 @@

Role, Property, State, and Tabindex Attributes

Javascript and CSS Source Code

-
    +
    • CSS: button.css @@ -185,7 +216,7 @@

      HTML Source Code

diff --git a/examples/button/js/button_idl.js b/examples/button/js/button_idl.js index c2fc4fd0d..825ecd80a 100644 --- a/examples/button/js/button_idl.js +++ b/examples/button/js/button_idl.js @@ -7,8 +7,8 @@ 'use strict'; -var ICON_MUTE_URL = 'images/mute.svg#icon-mute'; -var ICON_SOUND_URL = 'images/mute.svg#icon-sound'; +var ICON_MUTE_URL = '#icon-mute'; +var ICON_SOUND_URL = '#icon-sound'; function init() { var actionButton = document.getElementById('action'); diff --git a/test/tests/button_button-idl.js b/test/tests/button_button-idl.js index 38066722f..8d6c25d4a 100644 --- a/test/tests/button_button-idl.js +++ b/test/tests/button_button-idl.js @@ -8,7 +8,7 @@ const assertAttributeValues = require('../util/assertAttributeValues'); const ex = { printSelector: '#action', toggleSelector: '#toggle', - svgSelector: '#example svg', + svgSelector: '#example a svg', }; // Attributes