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

Fix: Publish date not announced in voice over; Redundant duplicate labels; #15381

Merged
merged 2 commits into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 4 additions & 16 deletions packages/edit-post/src/components/sidebar/post-schedule/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,25 @@
*/
import { __ } from '@wordpress/i18n';
import { PanelRow, Dropdown, Button } from '@wordpress/components';
import { withInstanceId } from '@wordpress/compose';
import { PostSchedule as PostScheduleForm, PostScheduleLabel, PostScheduleCheck } from '@wordpress/editor';

export function PostSchedule( { instanceId } ) {
export function PostSchedule() {
return (
<PostScheduleCheck>
<PanelRow className="edit-post-post-schedule">
<label
htmlFor={ `edit-post-post-schedule__toggle-${ instanceId }` }
id={ `edit-post-post-schedule__heading-${ instanceId }` }
>
<span>
{ __( 'Publish' ) }
</label>
</span>
<Dropdown
position="bottom left"
contentClassName="edit-post-post-schedule__dialog"
renderToggle={ ( { onToggle, isOpen } ) => (
<>
<label
className="edit-post-post-schedule__label"
htmlFor={ `edit-post-post-schedule__toggle-${ instanceId }` }
>
<PostScheduleLabel /> { __( 'Click to change' ) }
</label>
<Button
id={ `edit-post-post-schedule__toggle-${ instanceId }` }
type="button"
className="edit-post-post-schedule__toggle"
onClick={ onToggle }
aria-expanded={ isOpen }
aria-live="polite"
isLink
>
<PostScheduleLabel />
Expand All @@ -47,4 +35,4 @@ export function PostSchedule( { instanceId } ) {
);
}

export default withInstanceId( PostSchedule );
export default PostSchedule;
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
position: relative;
}

.edit-post-post-schedule__label {
display: none;
}

.components-button.edit-post-post-schedule__toggle {
text-align: right;
}
Expand Down