

IOS’ momentum scrolling can be enabled for this value with -webkit-overflow-scrolling. Of note with this value is that you get BOTH horizontal and vertical scrollbars no matter what, even if the content requires only one or the other. Setting the overflow value of a box to scroll will hide the content from rendering outside the box, but will offer scrollbars to scroll the interior of the box to view the content. So for example a user has their default font size set larger than you would expect, you may be pushing text outside of a box and hiding it completely from their view. However, bear in mind that content that is hidden in this way is utterly inaccessible (short of viewing the source). This is particularly useful in use with dynamic content and the possibility of an overflow causing serious layout problems.

This literally hides any content that extends beyond the box. The opposite of the default visible is hidden. Generally, you shouldn’t be setting static heights on boxes with web text in them anyway, so it shouldn’t come up. The important thing to remember here is that even though the content is visible outside of the box, that content does not affect the flow of the page. So in general, there is no reason to explicitly set this property to visible unless you are overriding it from being set elsewhere. If you don’t set the overflow property at all, the default is visible. Overflow comes into play more commonly when explicit widths and heights are set and it would be undesirable for any content to spill out, or when scrolling is explicitly being avoided. Unless a height is set, text will just push an element taller as well. Remember that text will naturally wrap at the end of an element (unless white-space is changed) so text will rarely be the cause of overflow. inherit: sets the overflow to the value of its parent element.initial: uses the default value which is visible.auto: if the content proceeds outside its box then that content will be hidden whilst a scroll bar should be visible for users to read the rest of the content.This can be used with overflow-clip-margin to set the clipped area. clip: content is clipped when it proceeds outside its box.

scroll: similar to hidden except users will be able to scroll through the hidden content.hidden: overflowing content will be hidden.This is the default value of the property visible: content is not clipped when it proceeds outside its box.In my case, I went for a background colour on the region.
OVERFLOW X HORIZONTAL SCROLL FULL
If, like me, your scrollable regions span the full viewport width, you may also want to customize the :focus-visible styles, since the default focus outline will overflow the viewport on the left and right edges. In short, you need to make the region keyboard-focusable ( tabindex="0"), which only Firefox does by default, and give it a descriptive ARIA role and label for screen reader users to understand why the tab stop exists: While I don’t mind the design of my personal website being a bit experimental and unfamiliar, actually making it inaccessible crosses a line for a site where I want to teach techniques to improve web accessibility.Īdrian Roselli’s article, Keyboard-Only Scrolling Areas is an excellent guide for what is needed to make a custom-styled horizontal scrolling area accessible to keyboard users. There are lots of situations where scroll is just not possible or not obvious without scrollbars. Without the arrow keys (which I wouldn’t have thought about using before seeing this thread as I’m not much of a keyboard user) I couldn’t have scrolled at all. My trackpad has no horizontal scrolling option. I have the same problem and I’m on Ubuntu.
OVERFLOW X HORIZONTAL SCROLL MAC
Guess what has no horizontal scrolling UI available? A mac with a trackball. I’ll tell you now - I can’t use it because I’m on a mac but using a trackball. On an early version implemented pretty much as described above, I got some excellent feedback from Matt Willcox: While horizontal scrolling is not intrinsically inaccessible, hiding the scrollbars with no alternative UI certainly is.
