Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1242 - Adds an alert informing the discontinuation of the title and focusable API #1331

Merged
merged 6 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions packages/clay-icon/src/ClayIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ ClayIcon.STATE = {
*/
elementClasses: Config.string(),

/**
* Flag to indicate if the svg is focusable or not
* @default false
* @instance
* @memberof ClayIcon
* @type {?bool}
*/
focusable: Config.bool().value(false),
pat270 marked this conversation as resolved.
Show resolved Hide resolved

/**
* Id to be applied to the element.
* @default undefined
Expand All @@ -61,15 +52,6 @@ ClayIcon.STATE = {
* @type {!string}
*/
symbol: Config.string().required(),

/**
* The title of the Clay SVG Icon.
* @default undefined
* @instance
* @memberof ClayIcon
* @type {?(string|undefined)}
*/
title: Config.string(),
};

defineWebComponent('clay-icon', ClayIcon);
Expand Down
12 changes: 2 additions & 10 deletions packages/clay-icon/src/ClayIcon.soy
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
{@param spritemap: string}
{@param symbol: string}
{@param? elementClasses: string}
{@param? focusable: bool}
{@param? id: string}
{@param? title: string}

{let $attributes kind="attributes"}
aria-hidden="true"
class="lexicon-icon
{sp}lexicon-icon-{$symbol}

Expand All @@ -21,19 +18,14 @@
{/if}
"

{if $focusable}
focusable="true"
{else}
focusable="false"
{/if}

{if $id}
id="{$id}"
{/if}

role="presentation"
{/let}

<svg {$attributes}>
<title>{$title ?: $id ?: $symbol}</title>
<use xlink:href="{$spritemap}#{$symbol}" />
</svg>
{/template}