@spectrum-web-components/divider
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.2.3](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/divider@0.2.2...@spectrum-web-components/divider@0.2.3) (2021-03-29) | ||
### Bug Fixes | ||
- **divider:** update a11y semantics ([46e6a12](https://github.com/adobe/spectrum-web-components/commit/46e6a1257135389e72a09f376f6b9149573873e6)) | ||
## [0.2.2](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/divider@0.2.1...@spectrum-web-components/divider@0.2.2) (2021-03-22) | ||
@@ -8,0 +14,0 @@ |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "", | ||
@@ -55,3 +55,3 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"@spectrum-css/divider": "^1.0.0" | ||
"@spectrum-css/divider": "^1.0.1" | ||
}, | ||
@@ -62,3 +62,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "ca6cd53b42caa5c52255f2af313d1689cf67157f" | ||
"gitHead": "4defd67aae71ad095d1c001bd1d23665edf39b24" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { SpectrumElement, CSSResultArray, TemplateResult } from '@spectrum-web-components/base'; | ||
import { SpectrumElement, CSSResultArray, TemplateResult, PropertyValues } from '@spectrum-web-components/base'; | ||
declare const Divider_base: typeof SpectrumElement & { | ||
@@ -13,3 +13,5 @@ new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface; | ||
protected render(): TemplateResult; | ||
protected firstUpdated(changed: PropertyValues<this>): void; | ||
protected updated(changed: PropertyValues<this>): void; | ||
} | ||
export {}; |
@@ -26,8 +26,19 @@ /* | ||
render() { | ||
if (this.vertical) | ||
return html ``; | ||
return html ` | ||
<hr /> | ||
`; | ||
return html ``; | ||
} | ||
firstUpdated(changed) { | ||
super.firstUpdated(changed); | ||
this.setAttribute('role', 'separator'); | ||
} | ||
updated(changed) { | ||
super.updated(changed); | ||
if (changed.has('vertical')) { | ||
if (this.vertical) { | ||
this.setAttribute('aria-orientation', 'vertical'); | ||
} | ||
else { | ||
this.removeAttribute('aria-orientation'); | ||
} | ||
} | ||
} | ||
} | ||
@@ -34,0 +45,0 @@ Divider.styles = [styles]; |
@@ -20,2 +20,3 @@ /* | ||
SizedMixin, | ||
PropertyValues, | ||
} from '@spectrum-web-components/base'; | ||
@@ -37,7 +38,20 @@ | ||
protected render(): TemplateResult { | ||
if (this.vertical) return html``; | ||
return html` | ||
<hr /> | ||
`; | ||
return html``; | ||
} | ||
protected firstUpdated(changed: PropertyValues<this>): void { | ||
super.firstUpdated(changed); | ||
this.setAttribute('role', 'separator'); | ||
} | ||
protected updated(changed: PropertyValues<this>): void { | ||
super.updated(changed); | ||
if (changed.has('vertical')) { | ||
if (this.vertical) { | ||
this.setAttribute('aria-orientation', 'vertical'); | ||
} else { | ||
this.removeAttribute('aria-orientation'); | ||
} | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50343
443