1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2015-08-07 10:21:29 -04:00
parent ffb0fd30b6
commit d131f21626
27 changed files with 180 additions and 115 deletions

View file

@ -1,6 +1,6 @@
{
"name": "paper-radio-button",
"version": "1.0.5",
"version": "1.0.6",
"description": "A material design radio button",
"authors": [
"The Polymer Authors"
@ -32,14 +32,13 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.0.5",
"_release": "1.0.6",
"_resolution": {
"type": "version",
"tag": "v1.0.5",
"commit": "05cd3c675d1e807362d2e72c83d3ae34c5d120a9"
"tag": "v1.0.6",
"commit": "85e8553c117d9ad10e7faa8d94f815455a675bd3"
},
"_source": "git://github.com/PolymerElements/paper-radio-button.git",
"_target": "~1.0.5",
"_originalSource": "PolymerElements/paper-radio-button",
"_direct": true
"_originalSource": "PolymerElements/paper-radio-button"
}

View file

@ -1,6 +1,6 @@
{
"name": "paper-radio-button",
"version": "1.0.5",
"version": "1.0.6",
"description": "A material design radio button",
"authors": [
"The Polymer Authors"

View file

@ -42,6 +42,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
:host #offRadio {
position: absolute;
box-sizing: content-box;
top: 0px;
left: 0px;
width: 12px;
@ -55,6 +56,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
:host #onRadio {
position: absolute;
box-sizing: content-box;
top: 4px;
left: 4px;
width: 8px;

View file

@ -109,11 +109,14 @@ Custom property | Description | Default
}
},
ready: function() {
if (Polymer.dom(this).textContent == '') {
attached: function() {
var trimmedText = Polymer.dom(this).textContent.trim();
if (trimmedText === '') {
this.$.radioLabel.hidden = true;
} else {
this.setAttribute('aria-label', Polymer.dom(this).textContent);
}
// Don't stomp over a user-set aria-label.
if (trimmedText !== '' && !this.getAttribute('aria-label')) {
this.setAttribute('aria-label', trimmedText);
}
this._isReady = true;
},

View file

@ -36,6 +36,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="AriaLabel">
<template>
<paper-radio-button aria-label="Batman">Robin</paper-radio-button>
</template>
</test-fixture>
<script>
suite('defaults', function() {
var r1;
@ -95,6 +101,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('button with a label sets an aria label', function() {
assert.isTrue(r2.getAttribute('aria-label') == "Batman");
});
test('button respects the user set aria-label', function() {
var c = fixture('AriaLabel');
assert.isTrue(c.getAttribute('aria-label') == "Batman");
});
});
</script>
</body>