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

feature(NoteMenuBar.tsx): add title attributes #580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
21 changes: 16 additions & 5 deletions src/client/containers/NoteMenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const NoteMenuBar = () => {
className="note-menu-bar-button"
onClick={togglePreviewHandler}
data-testid={TestID.PREVIEW_MODE}
title={isToggled ? 'Edit note' : 'Preview note'}
>
{isToggled ? (
<Edit aria-hidden="true" size={18} />
Expand All @@ -120,17 +121,25 @@ export const NoteMenuBar = () => {
</button>
{!activeNote.scratchpad && (
<>
<button className="note-menu-bar-button" onClick={favoriteNoteHandler}>
<button
className="note-menu-bar-button"
onClick={favoriteNoteHandler}
title="Add note to favorites"
>
<Star aria-hidden="true" size={18} />
<span className="sr-only">Add note to favorites</span>
</button>
<button className="note-menu-bar-button trash" onClick={trashNoteHandler}>
<button
className="note-menu-bar-button trash"
onClick={trashNoteHandler}
title="Delete note"
>
<Trash2 aria-hidden="true" size={18} />
<span className="sr-only">Delete note</span>
</button>
</>
)}
<button className="note-menu-bar-button">
<button className="note-menu-bar-button" title="Download note">
<Download aria-hidden="true" size={18} onClick={downloadNotesHandler} />
<span className="sr-only">Download note</span>
</button>
Expand All @@ -141,6 +150,7 @@ export const NoteMenuBar = () => {
setUuidCopiedText(successfulCopyMessage)
}}
data-testid={TestID.UUID_MENU_BAR_COPY_ICON}
title="Copy note"
>
{copyNoteIcon}
{uuidCopiedText && <span className="uuid-copied-text">{uuidCopiedText}</span>}
Expand All @@ -156,6 +166,7 @@ export const NoteMenuBar = () => {
className="note-menu-bar-button"
onClick={syncNotesHandler}
data-testid={TestID.TOPBAR_ACTION_SYNC_NOTES}
title="Sync notes"
>
{syncing ? (
<Loader aria-hidden="true" size={18} className="rotating-svg" />
Expand All @@ -164,12 +175,12 @@ export const NoteMenuBar = () => {
)}
<span className="sr-only">Sync notes</span>
</button>
<button className="note-menu-bar-button" onClick={toggleDarkThemeHandler}>
<button className="note-menu-bar-button" onClick={toggleDarkThemeHandler} title="Themes">
{darkTheme ? <Sun aria-hidden="true" size={18} /> : <Moon aria-hidden="true" size={18} />}
<span className="sr-only">Themes</span>
</button>

<button className="note-menu-bar-button" onClick={settingsHandler}>
<button className="note-menu-bar-button" onClick={settingsHandler} title="Settings">
<Settings aria-hidden="true" size={18} />
<span className="sr-only">Settings</span>
</button>
Expand Down