Bug 1042319 - [Gallery] WIP patch of update gallery edit UI and visuals

data attributes can be queried and set through the dataset property. So I think you could write this more clearly as:

  $('edit-modes-title').dataset.l10nId = 'exposure'

Note that the hypen gets dropped and the i gets capitalized.