Skip to content

Commit

Permalink
Sidebar permalink panel a11y improvements (#12030)
Browse files Browse the repository at this point in the history
* Use ExternalLink for links with target=_blank.

* Adjust font-weight values accordingly to current CSS coding standards.
  • Loading branch information
afercia authored Nov 19, 2018
1 parent 6ae6285 commit 3a57743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 5 additions & 5 deletions packages/edit-post/src/components/sidebar/post-link/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { get } from 'lodash';
*/
import { Fragment } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { PanelBody, TextControl } from '@wordpress/components';
import { PanelBody, TextControl, ExternalLink } from '@wordpress/components';
import { withSelect, withDispatch } from '@wordpress/data';
import { compose, ifCondition, withState } from '@wordpress/compose';
import { addQueryArgs } from '@wordpress/url';
Expand Down Expand Up @@ -77,7 +77,7 @@ function PostLink( {
<p className="edit-post-post-link__preview-label">
{ __( 'Preview' ) }
</p>
<a
<ExternalLink
className="edit-post-post-link__link"
href={ postLink }
target="_blank"
Expand All @@ -88,14 +88,14 @@ function PostLink( {
</Fragment> ) :
postLink
}
</a>
<a
</ExternalLink>
<ExternalLink
className="edit-post-post-link__permalink-settings"
href={ addQueryArgs( 'options-permalink.php' ) }
target="_blank"
>
{ __( 'Permalink Settings' ) }
</a>
</ExternalLink>
</PanelBody>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
.edit-post-post-link__link {
font-weight: 600;
}

.edit-post-post-link__link-post-name {
font-weight: 800;
font-weight: 600;
}

.edit-post-post-link__preview-label {
Expand All @@ -16,6 +12,5 @@

.edit-post-post-link__permalink-settings {
margin-top: 1em;
font-weight: 500;
display: block;
}

0 comments on commit 3a57743

Please sign in to comment.