Sha256: 29db10c63a18892276e015db53b73e013c7ef50d614852d69850b3c1a66cb7e5
Contents?: true
Size: 658 Bytes
Versions: 4
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true module Kitchen module Directions module BakeScreenreaderSpans # Add text for accessibility. # Additional screenreader spans can be added below. def self.v1(book:) book.search('u[data-effect="double-underline"]').each do |element| element.add_previous_sibling( '<span data-screenreader-only="true">double underline</span>' ) end book.search('u[data-effect="underline"]').each do |element| element.add_previous_sibling( '<span data-screenreader-only="true">underline</span>' ) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems