CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Cart with item count  (Read 146 times)

AndrewTraub

  • Jr. Member
  • **
  • Posts: 80
  • Karma: +0/-0
Cart with item count
« on: 26 Feb 2023, 11:49:47 am »
When developing a shopping cart that shows how many items in it, should the count of items be included as an attribute or put in its own span (for the sake of accessibility)?

For example, I could code it like this:
<a href="checkout" class="_icon_cart"><span>3</span><span>Checkout</span></a>

or like this:
<a href="checkout" class="_icon_cart" value=3><span>Checkout</span></a>

 

SMF spam blocked by CleanTalk

Advertisement