Making OSS #accessible for #ADHD people.
People with ADHD struggle with short term memory. We usually work around this with writing things down - using external tools to augment the short term memory.
When reading OSS codebase, it's a bit hard for us to read code that's written like this:
(taken from libeudev)
```
/**
* udev_device:
*
* Opaque object representing one kernel sys device.
*/
struct udev_device {
struct udev *udev;
struct udev_device *parent_device;
char *syspath;
const char *devpath;
char *sysname;
const char *sysnum;
char *devnode;
mode_t devnode_mode;
uid_t devnode_uid;
gid_t devnode_gid;
char *subsystem;
char *devtype;
char *driver;
char *action;
char *devpath_old;
char *id_filename;
char **envp;
char *monitor_buf;
size_t monitor_buf_len;
struct udev_list devlinks_list;
struct udev_list properties_list;
struct udev_list sysattr_value_list;
struct udev_list sysattr_list;
struct udev_list tags_list;
unsigned long long int seqnum;
usec_t usec_initialized;
int devlink_priority;
int refcount;
dev_t devnum;
int ifindex;
int watch_handle;
int maj, min;
bool parent_set;
bool subsystem_set;
bool devtype_set;
bool devlinks_uptodate;
bool envp_uptodate;
bool tags_uptodate;
bool driver_set;
bool info_loaded;
bool db_loaded;
bool uevent_loaded;
bool is_initialized;
bool sysattr_list_read;
bool db_persist;
};
```
This is hard to scan because of short term memory deficiency. Making a really small tweak to this can go a long way in helping a person with ADHD.
Chunking.
```
struct udev_device {
struct udev *udev;
int refcount;
struct udev_device *parent_device; bool parent_set;
/* sysfs */
char *syspath;
const char *devpath;
char *sysname;
const char *sysnum;
/* kernel classification */
char *subsystem; bool subsystem_set;
char *devtype; bool devtype_set;
char *driver; bool driver_set;
/* device node */
char *devnode;
dev_t devnum; int maj, min;
mode_t devnode_mode;
uid_t devnode_uid; gid_t devnode_gid;
/* network */
int ifindex;
/* netlink event data */
char *action;
unsigned long long int seqnum;
char *devpath_old;
/* properties */
struct udev_list properties_list;
char **envp; bool envp_uptodate;
char *monitor_buf; size_t monitor_buf_len;
/* tags and devlinks */
struct udev_list tags_list; bool tags_uptodate;
struct udev_list devlinks_list; bool devlinks_uptodate;
int devlink_priority;
/* sysfs attributes */
struct udev_list sysattr_value_list;
struct udev_list sysattr_list;
bool sysattr_list_read;
/* udev database */
char *id_filename;
usec_t usec_initialized;
bool is_initialized;
bool db_persist;
int watch_handle;
/* lazy loading */
bool info_loaded;
bool db_loaded;
bool uevent_loaded;
};
```
#ADHD #Accessibility #foss #oss #opensource #programming
farseen GoToSocial Actor feed
Making OSS # accessible for # ADHD people. People with ADHD str
Comments
lizzard@social.tchncs.de 3 weeks ago @farseen this is a great example showing accessibility helps everyone.