Best Answer

CSS to hide calendar button on ILT course player

  • 6 March 2023
  • 1 reply
  • 68 views

Badge

Does anyone have any CSS to hide the “Add to calendar” button on the course player page for ILT courses?

 

Thus far we’ve only been able to hide all three buttons (Calendar, Add to Playlist and Related Sections) wheras we only want to hide the first button.

icon

Best answer by Bfarkas 6 March 2023, 15:41

View original

1 reply

Userlevel 7
Badge +4

Yeah, the standard CSS classifyers won’t work as they are identical across the buttons, but they each have a different aria label for accessibility, which can be leveraged:
 

.button-wrap [aria-label='Calendar'] {
display: none;
}

Just be aware, while technically there is nothing wrong with this, its not the intention of the aria label, and aria labels can be updated more often as the impact to things like CSS is generally not a concern like updating other classes or ID’s. That being said, this one being ‘Calendar’ seems fairly safe.

Reply