mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
d2bb0d6805
commit
d96a2b7946
28 changed files with 109 additions and 118 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -35,11 +35,11 @@
|
|||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||
},
|
||||
"_release": "1.0.10",
|
||||
"_release": "1.0.11",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.10",
|
||||
"commit": "ce4a8e8663892e95fccc0142055db214fa292d6d"
|
||||
"tag": "v1.0.11",
|
||||
"commit": "00a147c81fe766f5c90222b2d1b0d8b5ddb12be5"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
||||
"_target": "~1.0.5",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -80,7 +80,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<div>
|
||||
<h4>Color</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-checkbox class="blue" checked>Oxygen</paper-checkbox>
|
||||
<paper-checkbox class="blue" checked aria-label="Hurray for oxygen">Oxygen</paper-checkbox>
|
||||
<paper-checkbox class="red" checked>Carbon</paper-checkbox>
|
||||
<paper-checkbox class="orange" checked>Hydrogen</paper-checkbox>
|
||||
<paper-checkbox class="green" checked>Nitrogen</paper-checkbox>
|
||||
|
|
|
@ -14,7 +14,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<link rel="import" href="../paper-styles/color.html">
|
||||
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
|
||||
<link rel="import" href="../iron-checked-element-behavior/iron-checked-element-behavior.html">
|
||||
|
||||
<!--
|
||||
Material design: [Checkbox](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox)
|
||||
|
||||
`paper-checkbox` is a button that can be either checked or unchecked. User
|
||||
can tap the checkbox to check or uncheck it. Usually you use checkboxes
|
||||
|
@ -243,23 +245,6 @@ Custom property | Description | Default
|
|||
|
||||
attached: function() {
|
||||
this._isReady = true;
|
||||
|
||||
// Don't stomp over a user-set aria-label.
|
||||
if (!this.getAttribute('aria-label')) {
|
||||
this.updateAriaLabel();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the checkbox aria-label. This is a temporary workaround not
|
||||
* being able to observe changes in <content>
|
||||
* (see: https://github.com/Polymer/polymer/issues/1773)
|
||||
*
|
||||
* Call this if you manually change the contents of the checkbox
|
||||
* and want the aria-label to match the new contents.
|
||||
*/
|
||||
updateAriaLabel: function() {
|
||||
this.setAttribute('aria-label', Polymer.dom(this).textContent.trim());
|
||||
},
|
||||
|
||||
// button-behavior hook
|
||||
|
|
|
@ -96,16 +96,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
c1.checked = true;
|
||||
assert.isTrue(c1.validate());
|
||||
});
|
||||
|
||||
test('checkbox label can be updated', function() {
|
||||
Polymer.dom(c1).textContent = 'Batman';
|
||||
c1.updateAriaLabel();
|
||||
assert.isTrue(c1.getAttribute('aria-label') == 'Batman');
|
||||
|
||||
Polymer.dom(c1).textContent = 'Robin';
|
||||
c1.updateAriaLabel();
|
||||
assert.isTrue(c1.getAttribute('aria-label') == 'Robin');
|
||||
});
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
|
@ -126,10 +116,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
assert.isTrue(!c1.getAttribute('aria-label'));
|
||||
});
|
||||
|
||||
test('checkbox with a label sets an aria label', function() {
|
||||
assert.isTrue(c2.getAttribute('aria-label') == "Batman");
|
||||
});
|
||||
|
||||
test('checkbox respects the user set aria-label', function() {
|
||||
var c = fixture('AriaLabel');
|
||||
assert.isTrue(c.getAttribute('aria-label') == "Batman");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue