xi-conversations

Minimal clone of thunderbird conversations
git clone https://git.ce9e.org/xi-conversations.git

commit
e068a8f9df97792c470bf5ce84104891c1fa3bee
parent
6eaccf3ba9b726dc6b483caadfe3d7e151b58f4e
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-09-06 02:59
use aria-pressed for star button

Diffstat

M content/js/actions.js 2 +-
M content/js/message.js 2 +-
M content/style.css 2 +-

3 files changed, 3 insertions, 3 deletions


diff --git a/content/js/actions.js b/content/js/actions.js

@@ -11,7 +11,7 @@ export var markAsRead = function(msg, read) {
   11    11 export var toggleFlagged = function(msg, star) {
   12    12 	msg.flagged = !msg.flagged;
   13    13 	browser.messages.update(msg.id, {flagged: msg.flagged}).then(() => {
   14    -1 		star.classList.toggle('is-active', msg.flagged);
   -1    14 		star.setAttribute('aria-pressed', msg.flagged);
   15    15 	});
   16    16 };
   17    17 

diff --git a/content/js/message.js b/content/js/message.js

@@ -53,7 +53,7 @@ export default function(msg, expanded) {
   53    53 
   54    54 	var e = h('article', {'class': expanded ? 'message is-expanded' : 'message', 'id': `msg-${msg.id}`, 'tabindex': -1}, [
   55    55 		h('header', {'class': 'message__header'}, [
   56    -1 			h('button', {'class': msg.flagged ? 'star is-active' : 'star', 'data-action': 'toggleFlagged'}, [util.createIcon('star')]),
   -1    56 			h('button', {'class': 'star', 'aria-pressed': msg.flagged, 'data-action': 'toggleFlagged'}, [util.createIcon('star')]),
   57    57 			...util.parseContacts([msg.author]).map(author => h('a', {
   58    58 				'class': 'message__author',
   59    59 				'href': `mailto:${author.email}`,

diff --git a/content/style.css b/content/style.css

@@ -259,6 +259,6 @@ body {
  259   259 	color: inherit;
  260   260 	padding: 0;
  261   261 }
  262    -1 .star.is-active {
   -1   262 .star[aria-pressed="true"] {
  263   263 	color: #fcb040;
  264   264 }