ddcornwall / nara-alaskana

National Archives Alaskana Explorer
1 stars 0 forks source link

Update Browse #22

Closed digilou closed 6 years ago

digilou commented 6 years ago

Closes #6

QA:

ddcornwall commented 6 years ago

Reviewing the code it looks like clicking on links will open in the same window. While I understand where you are coming from, I'm uncomfortable with that change. At this stage, if we have the user view a result in the same window and then click the back button, the search will re-execute. Some of the searches are time consuming for factors currently beyond our control. I think this would be a frustrating experience for more users.

I am open to ideas about how to fix it so that the search doesn't reexecute upon hitting the back button. Some kind of "return to results" link.

I'll also verify my suspicions by actually testing the code tonight or tomorrow. Time constraints keep me from doing it now.

ddcornwall commented 6 years ago

Also, everything else looked fine.

digilou commented 6 years ago

@ddcornwall It looks like Safari is the only one that preserves the results. Firefox and Chrome back button returns you to a clean slate without recent search results. Considering that code has to be revised to fix that, I'll return target=_blank.

It's only in the past year I've felt strongly about this due to the articles I've read. It is disorienting for screen readers, but can also be disorienting for others users, dependent upon their browser's default behavior and user expectations (which varies).

digilou commented 6 years ago

Something else to consider when opening in a new window/tab: https://developers.google.com/web/tools/lighthouse/audits/noopener I've added rel="no opener" to couple with target="_blank" per Google's recommendation.