We're planning a Bay Area trip in May-June and our route takes us near Yosemite, which is some place I've always wanted to visit, and so we want to stay about three to four nights in the area, ideally in the park. However, it's relatively late in the year to be booking, and so options are limited. I've found a few options in or very near the park but it involves shortening our stay, or living without electricity, or other compromises (with which we may decide to be okay, but I want to consider my options).
As far as places in the general Yosemite National Park area, what are viable places to stay as far as the ease of getting to the park, that are likely to still have accommodations 90 days in advance? Merced seems to have plenty of lodging at good prices, but it's almost a two-hour drive away. Fresno has some of the same problems but at least is closer to King's Canyon and Sequoia National Parks, which opens up other options.
As I don't wish this to be too subjective or specific to my situation, please give more general answers (examples of lodging are fine). In my specific case we are just a married couple, but others will surely have the same question and may have different circumstances.
As a good parallel example, Canmore, Alberta would be a good base for someone exploring Banff National Park - an easy drive to the park, but with a plethora of lodging options. What are the Yosemite equivalents, if any?