Use aria-label in admin table actions
This way screen reader users will know which record they're going to access when focusing on a link to a certain action. Otherwise they'd hear something like "Edit, link", and they wouldn't know which record they'll end up editing if they follow the link.
This commit is contained in:
@@ -3,6 +3,8 @@ class Poll
|
||||
belongs_to :booth
|
||||
belongs_to :poll
|
||||
|
||||
delegate :name, to: :booth
|
||||
|
||||
before_destroy :destroy_poll_shifts, only: :destroy
|
||||
|
||||
has_many :officer_assignments, dependent: :destroy
|
||||
|
||||
@@ -16,6 +16,10 @@ class Poll
|
||||
after_create :create_officer_assignments
|
||||
before_destroy :destroy_officer_assignments
|
||||
|
||||
def title
|
||||
"#{I18n.t("admin.poll_shifts.#{task}")} #{officer_name} #{I18n.l(date.to_date, format: :long)}"
|
||||
end
|
||||
|
||||
def persist_data
|
||||
self.officer_name = officer.name
|
||||
self.officer_email = officer.email
|
||||
|
||||
Reference in New Issue
Block a user