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

XWIKI-19145: Edit button must be unaccessible for keyboard while in edit mode #2191

Merged
merged 4 commits into from
Jun 1, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,10 @@ require(['jquery'], function($) {
}
// Disable the edit buttons and hide the section edit links.
editButton.add(translateButton).addClass('disabled');
editButton.attr('aria-disabled', 'true');
var reference = editButton.attr('href');
editButton.removeAttr('href');
editButton.attr('role', 'link');
$('#xwikicontent').children(':header').children('.edit_section').addClass('hidden');
event.preventDefault();
const handler = event.data;
Expand All @@ -1037,6 +1041,9 @@ require(['jquery'], function($) {
// * the translate button is restored (if needed) by the editInPlace module
// * the section edit links are restored when the document is rendered for view
editButton.removeClass('disabled');
editButton.removeAttr('aria-disabled');
editButton.removeAttr('role');
editButton.attr('href', reference);
});
// Fallback on the standalone edit mode if we fail to load the required modules.
}, disableInPlaceEditing.bind(event.target));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@
padding: @font-size-large;
}
}
a.btn.disabled {
opacity: 1;
.text-muted;
background-color: transparent;
}

.flat-buttons();
}